Upgrading to Mountain Lion

I just upgraded to Mountain Lion and here are some of my notes related to scientific Python installs.

If you’ve already got a working installation it will likely continue to work after upgrading. Regardless of whether you plan to keep using an existing install or make a new one you’ll probably want to do the following two things:

Xcode

You’ll need a Mountain Lion compatible set of command line tools and development libraries so reinstall Xcode or the Command Line Tools for Xcode. I personally prefer the later now that I use Sublime Text 2 for code editing. If you install Xcode make sure to install the command line tools from the preferences.

X11

Python Libraries

NumPy compiles without issue.

SciPy is waiting on a small change before it will compile on Mountain Lion. I expect that to go in soon and they may release SciPy 0.10.2 to make it Mountain Lion compatible. Even if they don’t you’ll be able to install from the GitHub repository once the change is made.

Like this:

Related

Post navigation

6 thoughts on “Upgrading to Mountain Lion”

I have upgraded to Mountain Lion and python did not work directly. Reinstalling fresh python also did not help. What I did to make it work was simple. I just copied the entire /Library/Python/2.7 folder from the time machine backup (which worked for Lion) and now it works as before.

I just did pip install numpy and there was no problem. I believe that installs numpy 1.6.2. Best thing to do is probably to try to install the latest numpy and see if it works. That’ll let you know whether the problem is numpy or something about your system.

I just got everything installed on Mountain Lion. I was starting from scratch with nothing initially installed.

I used pip install numpy and it installed without issue. However, when I tried to pip install scipy (I also tried to install it using the git repository with similar results) I got an error message that it couldn’t find npymath.ini in numpy (the full error message is documented here:http://stackoverflow.com/questions/12574604/scipy-install-on-mountain-lion-failing). Based on this I tried various methods of downloading numpy. I tried installing the dmg from sourceforge but it said that I didn’t have Python 2.6. I also tried retrieving it from github using both the pip install url (which failed in the same pip way) and by downloading the repository and running python setup.py build and python setup.py install. When I did the setup.py method I got an error message when I tried to import numpy that said that I couldn’t import numpy from the source folder even when I wasn’t in the source folder.