[英]Install problems with homebrew's python
Setting up a new mac here. 在这里设置新的Mac。 I just installed python with brew install python
, but when I try to install virtualenv with sudo pip install virtualenv
it returns sudo: pip: command not found
. 我刚刚用brew install python
,但是当我尝试用sudo pip install virtualenv
它返回sudo: pip: command not found
。
When I try sudo easy_install pip
it returns the following response 当我尝试sudo easy_install pip
它返回以下响应
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 11, in <module>
load_entry_point('setuptools==33.1.1', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
return self.resolve()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 10, in <module>
File "build/bdist.macosx-10.12-intel/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern
I can't imagine what is happening, but with my old installation I had any of this problems. 我无法想象发生了什么,但是在我的旧安装中,我遇到了任何此类问题。 Any help woul be really helpful… 任何帮助都会非常有帮助...
我更新此问题以发布可能的解决方案:
curl https://bootstrap.pypa.io/get-pip.py | sudo python
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.