brew install python,然后:“python-2.7.6已经安装,只是没有链接”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20691181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
brew install python, but then: "python-2.7.6 already installed, it's just not linked"
提问by A__
disclaimer: noob
免责声明:菜鸟
OSX 10.8.5
OSX 10.8.5
When I installed python in bash I got this warning and error:
当我在 bash 中安装 python 时,我收到了这个警告和错误:
Warning: Could not link python. Unlinking...
Error: The 'brew link' step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using 'brew link python
So I went ahead and typed
所以我继续输入
brew link python
and got
并得到
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
Should I do it? What does is mean to link python in this context, let alone force-link it, and what's formula_name?
我应该这样做吗?在这种情况下链接 python 是什么意思,更不用说强制链接它了,formula_name 是什么?
Thisquestion is similar but also different, so I'm afraid to try the top rated answer as it might just dig me deeper into the rabbit hole that I am stuck in right now.
这个问题相似但也不同,所以我不敢尝试评价最高的答案,因为它可能只会让我更深入地陷入我现在陷入困境的兔子洞。
采纳答案by William Denman
It looks like you have installed Python using another method before. Don't be scared. Homebrew is engineered so it won't mess up your system like Mac Ports et al.
看起来您之前已经使用另一种方法安装了 Python。不要害怕。Homebrew 经过精心设计,因此不会像 Mac Ports 等人那样弄乱您的系统。
You can always do brew link --overwrite --dry-run pythonto see first what exactly will be overwritten, without actually doing it.
您始终可以brew link --overwrite --dry-run python先查看将被覆盖的内容,而无需实际操作。
If once you do this it look like it is only overwriting or deleting *.pyscripts, then you should be even less scared.
如果一旦你这样做,它看起来只是覆盖或删除*.py脚本,那么你应该更不害怕。

