1

I want to use my brewed version of python but although many forums say to adjust path order so that your OS X python which corresponds to path /usr/bin is not used. I find that although my paths are set in the correct order that I still am calling the old OS X python.

justins-mbp:~ justinthong$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

As you can see when I use which python command it still gives me the original path.

justins-mbp:site-packages justinthong$ which python
/usr/bin/python

I am trying to be careful on not to force a symlink.

Justin Thong
  • 321
  • 3
  • 12
  • 1
    `which` doesn't look at `/etc/paths`; it looks at the current value of `PATH` in your environment. – chepner Jul 26 '17 at 23:16
  • @chepner Hi I just edited. `$PATHS` gives me the same order – Justin Thong Jul 26 '17 at 23:22
  • The solution is here: https://stackoverflow.com/questions/45170852/installing-homebrew-python-and-linking – Grischa Jul 27 '17 at 02:49
  • 1
    Possible duplicate of [Installing Homebrew Python and linking](https://stackoverflow.com/questions/45170852/installing-homebrew-python-and-linking) – Grischa Jul 27 '17 at 02:50

1 Answers1

0

Running:

brew info python

gives the answer to your question:

This formula installs a python2 executable to /usr/local/bin. If you wish to have this formula's python executable in your PATH then add the following to ~/.bash_profile:

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

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240