Python Anywhere and Anaconda

How can I include all the packages I am using so my flask application can access them? I know normally we would do pip install in a bash console. However, I am using anaconda as a package manager and all of the installed packages aren't where it would normally be stored if I were just using python and pip.

do you mean you are using conda instead of pip?

there are two things you could try.

  1. find where the conda virtualenv is, and put that into the webapp config for virtualenvs path (eg: just do a which python from within the conda env)
  2. do a conda list -e > requirements.txt, and then later pip install requirements.txt etc to transfer it over

Hey conrad,

I have tried doing conda list -e, but I get this error when trying to install with pip:

Invalid requirement: 'alabaster=0.7.12=py37_0' = is not a valid operator. Did you mean == ?

Hmm, to be honest I don't think conda will work with a website in PythonAnywhere, even if you could get the command-line stuff working. This is because conda is designed to take control of which Python binary is used when running your website, but on our system you can only use the system-installed Python binary. Anything you installed with conda (and thus any packages you installed with it) would just be ignored.

Hey giles thanks for the info!

Glad to help, and sorry I couldn't give better news!