当我尝试使用pip或安装任何内容时pip3,我得到:
pip
pip3
$ sudo pip3 install python3-tk Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')() File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load ['__name__']) File "/usr/lib/python3/dist-packages/pip/__init__.py", line 61, in <module> from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in <module> from pip.download import path_to_url File "/usr/lib/python3/dist-packages/pip/download.py", line 25, in <module> from requests.compat import IncompleteRead ImportError: cannot import name 'IncompleteRead'
我有一个Ubuntu 14.10系统。
我该如何解决这个问题?
尽管以前的答案可能是原因,但此片段为我解决了问题(在中Ubuntu14.04):
Ubuntu14.04
首先从程序包管理器中删除程序包:
# apt-get remove python-pip
然后并排安装最新版本:
# easy_install pip
(感谢@Aufziehvogel,@JunchaoGu)