gpt4 book ai didi

python-2.7 - Homebrew Python未安装setuptools

转载 作者:行者123 更新时间:2023-12-04 07:22:48 26 4
gpt4 key购买 nike

这一切都在iMac OSX 10.9.2上

进行python2.7的Homebrew安装时,所有东西似乎都在正确创建。但是,在完成并尝试使用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

我尝试卸载并重新安装Brewed 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
🍺 /usr/local/Cellar/python/2.7.6: 3790 files, 59M

我注意到Homebrew Python页面指示“brew install python”应在“/usr/local/lib/python2.7/site-packages”处创建一个站点软件包文件夹。但是,当我导航到“/usr/local/lib”并使用“ls -a”时,没有与python相关的文件夹。

brew doctor 报告没有错误

预先谢谢您,并让我知道可能需要其他信息。

最佳答案

万一其他人遇到这个问题,我确实设法从以下页面中找到解决方案:

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

显然,这是最新版本中的错误。做一个

brew install python --with-brewed-openssl

似乎可以解决问题。

汤姆

关于python-2.7 - Homebrew Python未安装setuptools,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22424435/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com