Question

I've installed Homebrew on my MacBook Pro (Mavericks), and Python 2.7.6, via Homebrew. How i can set up the Homebrew's path and the Python's path to use the site-packages and version 2.7.6 in my terminal? I've searched around for a clear answer but the thing it's pretty confusing, because someone say to edit the .profile file, someone else say the .bashrc file. I'm a Mac noob, so any help will be appreciated!

Was it helpful?

Solution

You can install Python 2.7:

$ brew install python

This will take a minute or two. Once that’s complete, you’ll have to add the new Python scripts directory to your PATH

To open

vi .bash_profile

then add

export PATH=/usr/local/share/python:$PATH

More details on this blogpost: http://johnlaudun.org/20120131-change-path-order-of-mac-os-x/

To try if Python is working on your mac or now.

Just run this command on your terminal :

python -c 'print "Hello World!"

If it prints "Hello World!" on your terminal, then congrats you have made it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top