我刚从 MacPorts 切换到 HomeBrew。在安装了所有必需的 XCode 版本和其他软件后,我尝试使用自制软件安装 python:我认为它已成功安装,但当我这样做时,which python
它仍然显示 2.7.3,我认为它是 Mountain Lion 附带的版本。
which python
/usr/local/bin/python
python --version
Python 2.7.3
所以我尝试再次安装
brew install python --framework --universal
Warning: python-2.7.5 already installed, it's just not linked
但它说 python 2.7.5 已经安装并且没有链接,我试着做brew link python
这导致我收到以下消息,所以我不知道我应该做什么:
链接 /usr/local/Cellar/python/2.7.5... 警告:无法链接 python。正在取消链接...
Error: Could not symlink file: /usr/local/Cellar/python/2.7.5/bin/smtpd2.py
Target /usr/local/bin/smtpd2.py already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name