2

I upgraded Python with "brew" from Python 2.7.5 to Python 2.7.14. I am using macOS Mavericks 10.9. I added this to .profile:

export PATH="/usr/local/bin:$PATH".

I don't want to mess with the system python (2.7.5). How do I make use of upgraded Python?

SiHa
  • 7,830
  • 13
  • 34
  • 43
rarevessell
  • 71
  • 2
  • 12

2 Answers2

2

Well , you have to update your .profile with the following export. Replace your the export with the following one.

export PATH="/usr/local/opt/python/libexec/bin:$PATH"
TheTechGuy
  • 1,568
  • 4
  • 18
  • 45
1

After you add your export to your .profile and save it, remember to do source ~/.profile from the terminal before trying to load your python.

Also, I also use macOS and all my PATH extensions are actually in a file called .bash_profile rather than .profile (which in my case is empty).

This describes the differences between .bashrc, .profile, and .bash_profile quite well.