Python 2.7 自制Python未安装setuptools

Python 2.7 自制Python未安装setuptools,python-2.7,homebrew,osx-mavericks,Python 2.7,Homebrew,Osx Mavericks,这些都是在iMac OSX 10.9.2上实现的 在进行python2.7的自制安装时,所有内容似乎都在正确创建。但是,在使用pip或easy_install完成并尝试任何操作后,我不断遇到以下错误: $ pip install virtualenv Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in <module> from pkg_resources import load

这些都是在iMac OSX 10.9.2上实现的

在进行python2.7的自制安装时,所有内容似乎都在正确创建。但是,在使用pip或easy_install完成并尝试任何操作后,我不断遇到以下错误:

$ pip install virtualenv
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
$pip安装virtualenv
回溯(最近一次呼叫最后一次):
文件“/usr/local/bin/pip”,第5行,在
从打包资源导入加载入口点
ImportError:没有名为pkg_资源的模块
我尝试过卸载和重新安装酝酿的python,结果也一样。我还使用-v运行了安装,它产生了以下结果:

==> Verifying python-2.7.6.mavericks.bottle.tar.gz checksum
==> Pouring python-2.7.6.mavericks.bottle.tar.gz
tar xf /Library/Caches/Homebrew/python-2.7.6.mavericks.bottle.tar.gz
==> Caveats
Python demo
  /usr/local/share/python/Extras

Setuptools and Pip have been installed. To update them
  pip install --upgrade setuptools
  pip install --upgrade pip

You can install Python packages with (the outdated easy_install or)
  `pip install <your_favorite_package>`

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python

.app bundles were installed.
Run `brew linkapps` to symlink these to /Applications.
==> Finishing up
ln -s ../Cellar/python/2.7.6/bin/smtpd2.py smtpd2.py
ln -s ../Cellar/python/2.7.6/bin/smtpd2.7.py smtpd2.7.py
ln -s ../Cellar/python/2.7.6/bin/smtpd.py smtpd.py
ln -s ../Cellar/python/2.7.6/bin/pythonw2.7 pythonw2.7
ln -s ../Cellar/python/2.7.6/bin/pythonw2 pythonw2
ln -s ../Cellar/python/2.7.6/bin/pythonw pythonw
ln -s ../Cellar/python/2.7.6/bin/python2.7-config python2.7-config
ln -s ../Cellar/python/2.7.6/bin/python2.7 python2.7
ln -s ../Cellar/python/2.7.6/bin/python2-config python2-config
ln -s ../Cellar/python/2.7.6/bin/python2 python2
ln -s ../Cellar/python/2.7.6/bin/python-config python-config
ln -s ../Cellar/python/2.7.6/bin/python python
ln -s ../Cellar/python/2.7.6/bin/pydoc2.7 pydoc2.7
ln -s ../Cellar/python/2.7.6/bin/pydoc2 pydoc2
ln -s ../Cellar/python/2.7.6/bin/pydoc pydoc
ln -s ../Cellar/python/2.7.6/bin/pip2.7 pip2.7
ln -s ../Cellar/python/2.7.6/bin/pip2 pip2
ln -s ../Cellar/python/2.7.6/bin/pip pip
ln -s ../Cellar/python/2.7.6/bin/idle2.7 idle2.7
ln -s ../Cellar/python/2.7.6/bin/idle2 idle2
ln -s ../Cellar/python/2.7.6/bin/idle idle
ln -s ../Cellar/python/2.7.6/bin/easy_install-2.7 easy_install-2.7
ln -s ../Cellar/python/2.7.6/bin/easy_install easy_install
ln -s ../Cellar/python/2.7.6/bin/2to3-2.7 2to3-2.7
ln -s ../Cellar/python/2.7.6/bin/2to3-2 2to3-2
ln -s ../Cellar/python/2.7.6/bin/2to3 2to3
ln -s ../Cellar/python/2.7.6/share/python python
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python2.7.1 python2.7.1
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python2.1 python2.1
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python.1 python.1
ln -s ../../../Cellar/python/2.7.6/Frameworks/Python.framework/Versions/Current Current
ln -s ../../../Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7 2.7
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Resources Resources
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Python Python
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Headers Headers
ln -s ../../Cellar/python/2.7.6 python
ln -s ../Cellar/python/2.7.6 python
==> Summary
In case anyone else runs into this I did manage to find a solution from the following page:

https://github.com/Homebrew/homebrew/issues/27515

It is apparently a bug in this most recent build. Doing a

brew install python --with-brewed-openssl
==>验证python-2.7.6.mavericks.bottle.tar.gz校验和
==>python-2.7.6.mavericks.bottle.tar.gz
tarxf/Library/Caches/Homebrew/python-2.7.6.mavericks.bottle.tar.gz
==>注意事项
Python演示
/usr/local/share/python/Extras
安装了Setuptools和Pip。更新它们
pip安装--升级安装工具
pip安装--升级pip
您可以使用(过时的easy_install或)安装Python软件包
`pip安装`
它们将安装到站点包目录中
/usr/local/lib/python2.7/site-packages
见:https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python
.已安装应用程序包。
运行“brew linkapps”将这些应用程序符号链接到/应用程序。
==>结束
ln-s../ceral/python/2.7.6/bin/smtpd2.py smtpd2.py
ln-s../ceral/python/2.7.6/bin/smtpd2.7.py smtpd2.7.py
ln-s../ceral/python/2.7.6/bin/smtpd.py smtpd.py
ln-s../ceral/python/2.7.6/bin/pythonw2.7 pythonw2.7
ln-s../ceral/python/2.7.6/bin/pythonw2 pythonw2
ln-s../ceral/python/2.7.6/bin/pythonw pythonw
ln-s../ceral/python/2.7.6/bin/python2.7-config python2.7-config
ln-s../Cell/python/2.7.6/bin/python2.7 python2.7
ln-s../cillar/python/2.7.6/bin/python2-config python2-config
ln-s../Cell/python/2.7.6/bin/python2 python2
ln-s../cillar/python/2.7.6/bin/python-config python-config
ln-s../ceral/python/2.7.6/bin/python
ln-s../ceral/python/2.7.6/bin/pydoc2.7 pydoc2.7
ln-s../ceral/python/2.7.6/bin/pydoc2 pydoc2
ln-s../ceral/python/2.7.6/bin/pydoc-pydoc
ln-s../ceral/python/2.7.6/bin/pip2.7 pip2.7
ln-s../ceral/python/2.7.6/bin/pip2-pip2
ln-s../ceral/python/2.7.6/bin/pip
ln-s../ceral/python/2.7.6/bin/idle2.7 idle2.7
ln-s../ceral/python/2.7.6/bin/idle2 idle2
ln-s../cillar/python/2.7.6/bin/idle
ln-s../cillar/python/2.7.6/bin/easy_-install-2.7 easy_-install-2.7
ln-s../cillar/python/2.7.6/bin/easy\u安装easy\u安装
ln-s../Cell/python/2.7.6/bin/2to3-2.7 2to3-2.7
ln-s../Cell/python/2.7.6/bin/2to3-2 2to3-2
ln-s../Cell/python/2.7.6/bin/2to3 2to3
ln-s../ceral/python/2.7.6/share/python
ln-s../../../ceral/python/2.7.6/share/man/man1/python2.7.1 python2.7.1
ln-s../../../ceral/python/2.7.6/share/man/man1/python2.1 python2.1
ln-s../../../ceral/python/2.7.6/share/man/man1/python.1 python.1
ln-s../../../ceral/python/2.7.6/Frameworks/python.framework/Versions/Current
ln-s../../../ceral/python/2.7.6/Frameworks/python.framework/Versions/2.7 2.7
ln-s.././ceral/python/2.7.6/Frameworks/python.framework/Resources
ln-s.././ceral/python/2.7.6/Frameworks/python.framework/python
ln-s.././ceral/python/2.7.6/Frameworks/python.framework/Headers
ln-s.././cillar/python/2.7.6 python
ln-s../ceral/python/2.7.6 python
==>摘要

如果其他人遇到这种情况,我确实从以下页面找到了解决方案:

这显然是最新版本中的一个bug。做一个

似乎是在耍花招


汤姆在
brew卸载python之后为我工作。谢谢10.13版仍然有效,Azure CLI可以正常工作。谢谢你的提示!