brew install python,但是:“已经安装了python-2.7.6,它没有被链接". [英] brew install python, but then: "python-2.7.6 already installed, it's just not linked"

查看:323
本文介绍了brew install python,但是:“已经安装了python-2.7.6,它没有被链接".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

免责声明:菜鸟

OSX 10.8.5

OSX 10.8.5

当我在bash中安装python时,出现了此警告和错误:

When I installed python in bash I got this warning and error:

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

所以我继续打字

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_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?

这个问题类似但也有所不同,因此我害怕尝试评分最高的答案因为它可能会使我更深入地了解我现在所处的兔子洞.

This question 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.

推荐答案

似乎您以前使用其他方法安装了Python.不要害怕自制软件经过精心设计,因此不会像Mac Ports等人那样弄乱您的系统.

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.

您始终可以执行brew link --overwrite --dry-run python来首先查看将被覆盖的确切内容,而无需实际执行.

You can always do brew link --overwrite --dry-run python to see first what exactly will be overwritten, without actually doing it.

如果执行此操作似乎只是覆盖或删除*.py脚本,那么您应该会更少害怕.

If once you do this it look like it is only overwriting or deleting *.py scripts, then you should be even less scared.

这篇关于brew install python,但是:“已经安装了python-2.7.6,它没有被链接".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆