Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew: Python version still 2.7.4 after homebrew install

I've installed Python using homebrew. which python returns /usr/local/bin/python which should be the homebrew install, if I'm not mistaken. When I run python, I get

Python 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

which tells me I'm still on version 2.7.4 rather than 2.7.5. If I then run brew upgrade python, I get Error: python-2.7.5 already installed.

Can anyone help me figure out what's happening here?

like image 376
raddevon Avatar asked Aug 04 '13 19:08

raddevon


People also ask

How do I install a specific version of Python on Mac terminal?

As an FYI: Python 3.4. 3_2 is $ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/bd43f59bd50bb49242259f327cb6ac7a8dd59478/Formula/python3.rb and then python3. 4 -V should work. @MikeWilliamson just clone the repo and do a git log master -- Formula/python.


1 Answers

I think I found the answer in a similar question. I was able to use @akauppi's answer to fix my problem. I'm guessing the symlink in /usr/bin/local/ was pointing to the system python or maybe just another older version I have on my system somewhere instead of the version installed by Homebrew. By running brew link --overwrite python, I was able to replace those old symlinks and I now show version 2.7.5 when I run python.

like image 135
raddevon Avatar answered Oct 16 '22 13:10

raddevon