我试着通过brew
与安装Python:酿造安装蟒蛇 - 失败OSX
brew install python
但得到以下错误:
Stevens-MacBook-Pro :: ~ ‹master*› » brew install python
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/python-2.7.
Already downloaded: /Library/Caches/Homebrew/python-2.7.8_2.mountain_lion.bottle.tar.gz
==> Pouring python-2.7.8_2.mountain_lion.bottle.tar.gz
==> Caveats
Setuptools and Pip have been installed. To update them
pip install --upgrade setuptools
pip install --upgrade pip
You can install Python packages with
pip install <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.
/usr/bin/install_name_tool: object: /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python malformed object (unknown load command 10)
Error: Failed to fix install names
The formula built, but you may encounter issues using it or linking other
formula against it.
==> /usr/local/Cellar/python/2.7.8_2/bin/python -ssetup.py --no-user-cfg instal
using one of the approaches described here:
Please make the appropriate changes for your system and try again.
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall python`
==> Summary
/usr/local/Cellar/python/2.7.8_2: 4626 files, 73M
错误消息说,安装后失败,尝试再次安装它:
brew postinstall python
但错误仍然存在。我也试过brew linkapps
,它的成功完全链接蟒蛇,但是当我从控制台运行pip
我得到这个错误:
Stevens-MacBook-Pro :: ~ ‹master*› » pip
zsh: /usr/local/bin/pip: bad interpreter: @@[email protected]@/opt/python/bin/python2.7: no such file or directory
任何想法可能什么错?
您的install_name_tool看起来很糟糕。 “brew doctor”和“brew config”是什么意思?如果'brew doctor'给你一个关于install_name_tool的警告,你可以看看使用像Pacifist这样的工具来重新安装系统版本。 – 2014-10-17 06:05:55