pip install traceback error while installing packages in Python

ⅰ亾dé卋堺 提交于 2019-12-01 18:53:24

问题


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: cannot import name IncompleteRead


回答1:


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.



来源:https://stackoverflow.com/questions/27318535/pip-install-traceback-error-while-installing-packages-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!