How do I use brew installed Python as the default Python? How do I use brew installed Python as the default Python? python python

How do I use brew installed Python as the default Python?


As you are using Homebrew the following command gives a better picture:

brew doctor

Output:

==> /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. This is an issue if you eg. brew installed Python.

Consider editing your .bash_profile to put: /usr/local/bin ahead of /usr/bin in your $PATH.


See: How to symlink python in Homebrew?

$ brew link --overwrite pythonLinking /usr/local/Cellar/python/2.7.3... 28 symlinks created$ which python/usr/local/bin/python


As suggested by the homebrew installer itself, be sure to add this to your .bashrc or .zshrc:

export PATH="/usr/local/opt/python/libexec/bin:$PATH"