brew安装python,但随后:“安装”;python-2.7.6已经安装,它';“只是没有联系”;

brew安装python,但随后:“安装”;python-2.7.6已经安装,它';“只是没有联系”;,python,bash,homebrew,Python,Bash,Homebrew,免责声明:noob OSX 10.8.5 当我在bash中安装python时,我得到了: 所以我继续打字 brew link python 得到 Linking /usr/local/Cellar/python/2.7.6... Warning: Could not link python. Unlinking... Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/bin/smtpd2.py Target /usr

免责声明:noob

OSX 10.8.5

当我在bash中安装python时,我得到了:

所以我继续打字

brew link python
得到

Linking /usr/local/Cellar/python/2.7.6... Warning: Could not link python. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/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
我应该这样做吗?在这个上下文中链接python意味着什么,更不用说强制链接了,formula_的名称是什么


这个问题是相似的,但也不同,所以我害怕尝试最高评级的答案,因为它可能会把我更深地陷入我现在陷入的兔子洞

看起来您以前使用过另一种方法安装Python。别害怕。自制软件经过精心设计,不会像Mac Ports等软件那样扰乱您的系统

您始终可以执行
brew链接--overwrite--dry run python
,首先查看要覆盖的内容,而不必实际执行


如果一旦你这样做了,它看起来只是在覆盖或删除
*.py
脚本,那么你应该更不害怕

我不会担心:)我不确定,但它似乎只是想取代一个符号链接。我自己也做过几次。但是,不要相信我的话:pYou可以运行
brew doctor
查看是否有任何问题。我认为强制链接是安全的。谢谢!它们大多是.py文档,但无论如何我都重写了它,这实际上也解决了我遇到的其他问题(比如能够安装virtualenv)。我想这只是版本之间的问题,欢迎。是的,肯定是版本冲突。最好的情况是修复
brew doctor
发出的所有警告。
Linking /usr/local/Cellar/python/2.7.6... Warning: Could not link python. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/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