Reputation: 31
I've installed python via homebrew. It is located in: /usr/local/Cellar/python/2.7.13_1 which should be right. Now I am trying to use this python installation, but "which python" only shows the macOS python installation at "/usr/bin/python". So i am checking the $PATH and I see that everything should be ok.
"echo $PATH" results in this: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I restarted the terminal window and this occurs every time. I also did the "brew doctor" and no warnings appeared.
What I am using: Standard macOS Terminal-App
Has anybody a clue how this problem could be solved?
Upvotes: 2
Views: 472
Reputation: 1
Brew create an python2 alias to
/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
I just created a copy of python2 alias and rename it to python. That solved the problem
Upvotes: 0
Reputation: 638
Either add the Python Homebrew prefix to your $PATH
, like @Zico suggests in his answer, or link the Python executable into /usr/local/bin
(which might already be in your path)
You'd do that with
$ brew link python
Good luck :)
Upvotes: 0
Reputation: 2447
Update $PATH
in your .bashrc
file.
Example add the following line in your .bashrc
export PATH=/usr/local/Cellar/python/2.7.13_1/bin:$PATH
Upvotes: 0