Reputation: 3832
I have created a virtual enviroment using virtualenv
command with a standard procedure. Now, when I activate it or deactivate, the output of which pip
or which python
gives me same output /usr/local/bin/pip
. However there is copies of python and pip commands in my vitrual enviroment directory - I have found them there. What might be the problem?
Upvotes: 9
Views: 2252
Reputation: 31
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
Upvotes: 3
Reputation: 1606
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.
Upvotes: 8