Activating python virtual environment does not switch to local versions of pip and python commands

Did you move the virtual environment folder to a different name? The original path to the virtual environment is written into the generated activate script so if you move the environment activate will set your path to the old path of the virtual environment.

To fix this run virtualenv --relocatable $YOUR_VIRTUALENV_PATH then modify the VIRTUAL_ENV variable in the activate script to point to your new location.


I think it happen when I moved the environment folder to a different location. I solved it by reinstalling virtualenv and creating a new environment