问题
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
按照教程安装,最后仍出现上面错误,最后发现是pip的版本太低,更新时使用的时Ubuntu自带的pip出现上面错误。
Ubuntu14.04上你用sudo apt-get install python-pip下载安装,在使用时出现上面的错误。于是查看教程,使用下面安装方法:
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
sudo python get-pip.py
最后发现安装时还时不能安装。于是试试看卸载原来的pip,在安装发现能安装。
apt-get remove --purge python-pip 后在进行安装便可以成功安装pip了,然后:sudo pip install Scrapy 后便能成功安装Scrapy。