Is there any way to make pip play well with multiple versions of Python? For example, I want to use pip to explicitly install things to either my site 2.5 installation or my site 2.6 installation.
For example, with easy_install, I use easy_install-2.{5,6}.
And, yes — I know about virtualenv, and no — it’s not a solution to this particular problem.
The current recommendation is to use
python -m pip, wherepythonis the version of Python you would like to use. This is the recommendation because it works across all versions of Python, and in all forms of virtualenv. For example:Previous answer, left for posterity:
Since version 0.8, Pip supports
pip-{version}. You can use it the same aseasy_install-{version}:EDIT: pip changed its schema to use
pipVERSIONinstead ofpip-VERSIONin version 1.5. You should use the following if you havepip >= 1.5:Check https://github.com/pypa/pip/pull/1053 for more details
References:
http://www.pip-installer.org/docs/pip/en/0.8.3/news.html#id4https://pip.pypa.io/en/stable/news/#v0-8 or
https://web.archive.org/web/20140310013920/http://www.pip-installer.org:80/docs/pip/en/0.8.3/news.html#id4