无法让 pip 在 Fedora 22 Virtualbox 中的 Python 2.6 上运行

无法让 pip 在 Fedora 22 Virtualbox 中的 Python 2.6 上运行

我正在开发一个项目,必须在 Fedora VM 中使用 Python 2.6.6 进行测试。我已经成功安装了它(因此我可以使用它而不是默认的 2.7),但我需要使用 pip 安装一些软件包,但出现了错误。当我使用 sudo pip(或 pip2.6)安装时,出现以下错误:

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'

值得注意的是“pip2.7 install”正在运行,但我确实需要能够安装 Python 2.6 的包。

任何帮助都将非常感激。

相关内容