Setting up Python, scipy, numpy, on Mac OS X 10.6.8

I want to use an environment that’s a Matlab alternative. A Matlab student license is $500, and I’ve been meaning to become better acquainted with python and scipy, numpy, etc.

Looked around online for a website or a blog post on installing python, scipy, numpy, and matplotlib on Mac OS X 10.6 and finally found a really good source:

Also looked at this GitHub GIST post: Both of the above helped

To install python, numpy, scipy, matplot lib, etc. (don’t type the quotation marks, just the text inside)

  1. Install Homebrew:
  2. After homebrew has been installed, type, “brew install git” into the terminal
    1. Check that homebrew installed correctly by typing, “brew update” and “brew doctor”
  3. Next install python by typing, “brew install python –framework –universal”
    1. When you edit your path environment, look at this link
    2. Check that python is working,  type “python” in the terminal window and make sure that 2.7.2 is the current version. Type “quit()” to quit.
  4. Install pip with easy_install, “easy_install pip”
    1. easy_install came with homebrew
  5. Setup a virtual environment to install scipy and numpy and matplotlib
    1. This step is for convenience only. Everything from here on out will affect the virtual environment that you create.
    2. type “pip install virtualenv”
    3. type “pip install virtualenvwrapper”
    4. source the virtualenvwrapper script, “source /usr/local/share/python/”
    5. This creates a hidden virtualenv director at ~/.virtualenv
    6. Make first virtualenv, “mkvirtualenv test1″
      1. This virtualenv test1 comes with a complete install of Python 2.7.2 and its own version of Pip. It’s activated by default, so running any pip command will only impact this environment.
      2. This brings up a good question, how the hell do I go exit and re-enter a virtualenv?
      3. Hopefully this holds the answers:
      4. The above link is great! Use virtualenv to its fullest!
About these ads
Tagged , , , , ,

One thought on “Setting up Python, scipy, numpy, on Mac OS X 10.6.8

  1. Remember, to use the virtualenvwrapper commands so that you can navigate to an established virtualenv, type in the following to your terminal: source /usr/local/share/python/
    This sources the virtualenvswrapper script. Now you can type commands like cdvirtualenv to navigate to the current directory for the virtualenv you’re working on.
    Also use the “workon” command to choose which virtualenv to work on.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: