修复:pip 'module' object has no attribute '_handlerList'

来源:互联网 发布:程序员之死的文化深意 编辑:程序博客网 时间:2024/06/13 22:24

问题

在运行pip install xxx
出现 ‘module’ object has no attribute ‘_handlerList’

Traceback (most recent call last):  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 11, in <module>    load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/__init__.py", line 233, in main    return command.main(cmd_args)  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 185, in main    for name in ["pip._vendor", "distlib", "requests", "urllib3"]  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/compat/dictconfig.py", line 565, in dictConfig    dictConfigClass(config).configure()  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/compat/dictconfig.py", line 332, in configure    del logging._handlerList[:]AttributeError: 'module' object has no attribute '_handlerList'

解决

方法1、升级pip
easy_install –upgrade pip
方法2、
pip install requests==2.6

阅读全文
0 0
原创粉丝点击