简体   繁体   English

在Python中安装软件包时pip安装回溯错误

[英]pip install traceback error while installing packages in Python

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. 我有问题使用'pip'安装python软件包,直到几天前我都没有问题,但现在突然我每次都想安装一些东西时都会出现错误。 I'm using Python 2.7 on windows, and I already reinstall 'pip' by still the same. 我在Windows上使用Python 2.7,我已经重新安装'pip'仍然是相同的。

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: cannot import name IncompleteRead ImportError: 无法导入名称IncompleteRead

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. 听起来你需要完全删除请求和任何对它的引用,并使用pip以外的东西重新安装它。 Otherwise pip may reinstall the old version using its cache. 否则pip可能会使用其缓存重新安装旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM