Forums

replacing virtualenv with conda

is it possible to replace virtualenv with conda, for django app deployment, on python anywhere?

It might be possible by hacking your wsgi.py to exec with the conda's python. But it is a hack and it will not give you the nice stuff like starting a console within the your virtualenv/conda environment from the webapps tab. It will probably be much much easier to just get conda to splat out a requirements.txt and setting up a virtualenv for it.

Just something like

conda list -e > requirements.txt
mkvirtualenv myvirtualenv --python=`which python3.5`
pip install -r requirements.txt

I got: mkvirtualenv: Command not found

The solution seems to be:

source `which virtualenvwrapper.sh`

See solution 2 https://stackoverflow.com/questions/13855463/bash-mkvirtualenv-command-not-found

If you've changed your .bashrc so that it doesn't do that, then you need to do it manually.