pip因属性错误而失败:没有属性_handerList

时间:2016-06-08 19:54:03

标签: python pip

我刚刚从pip安装了“logging”,现在pip被破坏了。我已经尝试了sudo rm /usr/local/bin/pip*; sudo easy_install pip并且没有解决问题。尝试安装软件包的完整结果:

    Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==8.1.1', 'console_scripts', 'pip')()
  File "/Library/Python/2.7/site-packages/pip/__init__.py", line 217, in main
    return command.main(cmd_args)
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 179, in main
    for name in ["pip._vendor", "distlib", "requests", "urllib3"]
  File "/Library/Python/2.7/site-packages/pip/compat/dictconfig.py", line 565, in dictConfig
    dictConfigClass(config).configure()
  File "/Library/Python/2.7/site-packages/pip/compat/dictconfig.py", line 332, in configure
    del logging._handlerList[:]
AttributeError: 'module' object has no attribute '_handlerList'

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:2)

您可以尝试通过Python本身或使用pip并强制升级来正确地重新安装easy_install

<强>的Python

python -m pip install --upgrade --force pip

<强> easy_install的

sudo easy_install --upgrade pip