wim wim -4 years ago 112
Python Question

Control the pip version in virtualenv

How do I control the version of

pip
which is used in a freshly created virtualenv? I believe I've eradicated all other versions of pip from the OS, but still mkvirtualenv gets a pip-1.5 from somewhere! I want it to use pip 1.4.1 in the virtualenv.

$ which pip
/usr/local/bin/pip
$ pip --version
pip 1.4.1 from /usr/local/lib/python2.7/dist-packages/pip-1.4.1-py2.7.egg (python 2.7)
$ pip install virtualenv virtualenvwrapper
<snip...>
Successfully installed virtualenv virtualenvwrapper
Cleaning up...
$ source ~/.bashrc
$ mkvirtualenv spam
New python executable in spam/bin/python
Installing setuptools, pip...done.
(spam)$ which pip
/home/wim/.virtualenvs/spam/bin/pip
(spam)$ pip --version
pip 1.5 from /home/wim/.virtualenvs/spam/local/lib/python2.7/site-packages (python 2.7)

Answer Source

It's easy enough to replace the pip that gets installed in your virtual environment. With your virtual environment active simply say

    pip install pip==1.4.1
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download