[Answer]-Change Virtualenv save location


You could freeze your current env and get all the pacakges in it in a requirements file, then create a new virtualenv in the directory you desire.

cd your/package/directory
virtualenv env
source env/bin/activate
pip install -r path/to/your/saved/requirements/file

Judging by your comments, I think it is important to understand that environments can be created anywhere on your filesystem you choose. By using terminal and the virtualenv command you can create environments in any directory


Virtualenv environments encode the original location of the venv in many files.

To fix this, using the same virtualenv binary you created them with, run virtualenv --relocatable <VENV_NAME> to make them relocatable, then move the directories wherever you like. The --relocatable option is documented as “experimental” so using the frozen requirements method from dm03514’s answer might be safer.

Leave a comment