Cannot get pip working on Python 2.6 in Fedora 22 Virtualbox

1

I'm working on a project that must be tested in a Fedora VM with Python 2.6.6. I have successfully installed that (so I can use that instead of the default 2.7), but I need to install some packages using pip, and I'm getting an error. When I use sudo pip (or pip2.6) install, I get the following error:

Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in load_entry_point('pip==7.0.1', 'console_scripts', 'pip')() File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 558, in load_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2682, in load_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2355, in load File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 2361, in resolve File "/usr/local/lib/python2.6/site-packages/pip-7.0.1-py2.6.egg/pip/init.py", line 15, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/local/lib/python2.6/site-packages/pip-7.0.1-py2.6.egg/pip/vcs/subversion.py", line 9, in from pip.index import Link File "/usr/local/lib/python2.6/site-packages/pip-7.0.1-py2.6.egg/pip/index.py", line 30, in from pip.wheel import Wheel, wheel_ext File "/usr/local/lib/python2.6/site-packages/pip-7.0.1-py2.6.egg/pip/wheel.py", line 34, in from pip._vendor.distlib.scripts import ScriptMaker File "/usr/local/lib/python2.6/site-packages/pip-7.0.1-py2.6.egg/pip/_vendor/init.py", line 92, in load_module raise ImportError("No module named '%s'" % (name,)) ImportError: No module named 'pip._vendor.distlib.scripts'

It might be worth noting that "pip2.7 install" is working, but I do need to be able to install packages for Python 2.6.

Any help would be very appreciated.

AGin the Asian

Posted 2015-06-25T21:05:07.367

Reputation: 11

Maybe it does not solve your problem in this way, but have you tried using pythonz? It is similar to rvm but for Python, which manages multiple python versions.

– xuhdev – 2015-06-25T21:19:33.147

No answers