raddevon
raddevon

Reputation: 3340

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?

Upvotes: 6

Views: 5362

Answers (1)

raddevon
raddevon

Reputation: 3340

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.

Upvotes: 6

Related Questions