Reputation: 8031
I'm working in a python virtual environment (with virtualenvwrapper
).
I created a branch of my code and I wanted to edit it in a different virtualenv. I define the path to my django src folder (and a few more things) in the postactivate script.
I did $ cpvirtualenv ~/.virtualenv/v1 ~/.virtualenv/v2
it was copied successfully.
I then workon v2
and wanted to pip uninstall PIL
. I get the following error:
Not uninstalling PIL at /home/myuser/.virtualenv/v1/lib/python2.7/site-packages/PIL, outside environment /home/myuser/.virtualenv/v2
I also tried it from ~/.virtualenv/v2
I don't want to uninstall PIL from v1, but from v2. I also tried virtualenv-clone and I don't get what's happening.
I can always create a new virtualenv, copy the postactivate script and pip -r install requirements.txt
but I'd like to understand the error I got.
Upvotes: 0
Views: 811
Reputation: 1970
Excerpt from the doc:
Copying virtual environments is not well supported. Each virtualenv has path information hard-coded into it, and there may be cases where the copy code does not know to update a particular file. Use with caution.
Upvotes: 1