Virtualenv migration notes

项月亮
1 min readAug 6, 2020

When you changed the directory of virtualenv(venv), python interpreter will use default interpreter of your system rather than virtualenv’s interpreter, so after changing the directory, you should also modify some configuration files.

venv/bin/activate

change a line like this

VIRTUAL_ENV='[CURRENT PATH OF VENV]'

/venv/bin/pip3, venv/bin/pip

The original path of python interpreter is specified in the first line, it’s invalid after your migrating virtualenv, so change it to

#![CURRENT PATH OF PYTHON]

Finally, reload the virtualenv

source activate

--

--