Instalei o python2.7 no Linux e quero instalar pip em /path/to/python2.7.9/bin
. Então eu fiz isso:
> cd /path/to/setuptools-16.0
> /path/to/python2.7.9/bin/python setup.py install
> cd /path/to/pip-7.0.0
> /path/to/python2.7.9/bin/python setup.py install
Em seguida, o pip é instalado em /path/to/python2.7.9/bin
. Mas quando eu executei /path/to/python2.7.9/bin/pip
, mostra:
> ~/local/python-2.7.9/bin/pip
Traceback (most recent call last):
File "/root/local/python-2.7.9/bin/pip", line 9, in <module>
load_entry_point('pip==7.0.0', 'console_scripts', 'pip')()
File "/root/local/python-2.7.9/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/root/local/python-2.7.9/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2381, in load_entry_point
return ep.load()
File "/root/local/python-2.7.9/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2087, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/root/local/python-2.7.9/lib/python2.7/site-packages/pip-7.0.0-py2.7.egg/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/root/local/python-2.7.9/lib/python2.7/site-packages/pip-7.0.0-py2.7.egg/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/root/local/python-2.7.9/lib/python2.7/site-packages/pip-7.0.0-py2.7.egg/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/root/local/python-2.7.9/lib/python2.7/site-packages/pip-7.0.0-py2.7.egg/pip/wheel.py", line 34, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/root/local/python-2.7.9/lib/python2.7/site-packages/pip-7.0.0-py2.7.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'
Eu tentei instalar muitos pacotes, como distribuir , scripts . Mas não ajuda.
Eu não sei o que está errado. Pode me ajudar?
Obrigado.