在为OSX安装pip和其他环境事件时遇到问题。浏览SE上的不同指南(包括这些link,link),每个人的解决方案似乎是卸载pip,然后使用easy_install进行安装。问题是,easy_install给出了这个错误:
Traceback (most recent call last):
File "/usr/local/opt/python/libexec/bin/easy_install", line 11, in <module>
load_entry_point('setuptools==36.5.0', 'console_scripts', 'easy_install-2.7')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2409, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2415, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>
from setuptools.extern.six.moves import filter, map
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/__init__.py", line 160, in <module>
monkey.patch_all()
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/monkey.py", line 67, in patch_all
distutils.core.Command = setuptools.Command
AttributeError: 'module' object has no attribute 'Command'
我的下一步是什么?我正在尝试卸载pip并重新安装它,因为pip本身也给出了同样的错误。