David Wolever David Wolever - 1 year ago 120
Python Question

pip: dealing with multiple Python versions?

Is there any way to make

play well with multiple versions of Python? For example, I want to use
to explicitly install things to either my site 2.5 installation or my site 2.6 installation.

For example, with
, I use

And, yes — I know about virtualenv, and no — it's not a solution to this particular problem.

Answer Source

Since version 0.8, Pip supports pip-{version}. You can use it the same as easy_install-{version}:

$ pip-2.5 install myfoopackage
$ pip-2.6 install otherpackage
$ pip-2.7 install mybarpackage

EDIT: pip changed its schema to use pipVERSION instead of pip-VERSION in version 1.5. You should use the following if you have pip >= 1.5:

$ pip2.6 install otherpackage
$ pip2.7 install mybarpackage

Check https://github.com/pypa/pip/pull/1053 for more details


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download