问题描述
我在使用'pip'安装python软件包时遇到问题,直到几天前我都没有问题,但是现在突然间,每次我想要安装某些东西时,我都会遇到下面的错误.我在Windows上使用的是Python 2.7,并且已经通过相同的方式重新安装了"pip".
I'm having issues to install python packages using 'pip', i have no problems until a couple of days ago, but now suddenly I have the error below every time i want to install something.I'm using Python 2.7 on windows, and I already reinstall 'pip' by still the same.
Traceback (most recent call last):
File "C:\Python27\Scripts\pip-script.py", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build\bdist.win32\egg\pkg_resources.py", line 339, in load_entry_point
ns.clear()
File "build\bdist.win32\egg\pkg_resources.py", line 2470, in load_entry_point
else:
File "build\bdist.win32\egg\pkg_resources.py", line 2184, in load
raise ValueError
File "C:\Python27\lib\site-packages\pip\__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "C:\Python27\lib\site-packages\pip\vcs\mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "C:\Python27\lib\site-packages\pip\download.py", line 26, in <module>
from requests.compat import IncompleteRead
ImportError:无法导入名称IncompleteRead
ImportError: cannot import name IncompleteRead
推荐答案
根据此错误,您可能安装了错误的请求版本.听起来您需要完全删除请求及其所有引用,然后使用pip以外的其他方式重新安装它.否则pip可能会使用其缓存重新安装旧版本.
According to this bug, you likely have a bad version of requests installed. It sounds like you need to remove requests completely and any reference to it and reinstall it using something other than pip. Otherwise pip may reinstall the old version using its cache.
这篇关于在Python中安装软件包时出现pip install traceback错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!