Why do distribute and pip install to my virtualenv's ./local/bin?
I have a feeling there's a bug in Ubuntu's python packages or distribute somewhere… but I haven't tracked it down (and I'm not sure I care to).
For whatever reason, the VIRTUAL_ENV environment variable needs to be set the root of the virtualenv for distribute and pip to install properly.
This gist, adopted from Vinay Sajip's code sample in the Python 3 docs, sets said variable; both distribute and pip will install properly when using it.
It's in the python docs.
'/usr/local' is the default exec_prefix. Read the venv docs for detail how to change the default behaviour. There's even an example there that shows how to make a venv.EnvBuilder
that installs distribute and pip for you.
if you find distribute docs, please let me know ;-)
I had the same problem.In activate
script file I need to add as first line (of cource after #!...
):
unset PYTHON_PATH