Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew install python, but then: "python-2.7.6 already installed, it's just not linked"

disclaimer: noob

OSX 10.8.5

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 

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?

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.

like image 283
A__ Avatar asked Dec 19 '13 20:12

A__


People also ask

Can you install python twice?

It is fine to have both of them as long as you knew what version is invoked when you run your scripts. As stated by others, check your PATH system variable. In the past I also had Python 2.7 and Python 3.5 installed together. What I did was I renamed my python.exe file in my Python 3.5 installation into python3.exe .

Does python need installation?

On other platforms just use the python script. Show activity on this post. This program can freeze your python code into a .exe file and some other pyd files, it can be run without installing python. NOTE: You will need to install python to freeze, but you don't need python to run the program.


1 Answers

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.

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

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

like image 65
William Denman Avatar answered Oct 05 '22 04:10

William Denman