Wednesday, August 29, 2012

Want to get Python 3 working with ipython, scipy and matplotlib on Mac OS X Lion or Mountain Lion?

My instructions on how to get Python working with iPython, Scipy and matplotlib on Lion and Mountain Lion work for Python 2.x. A reader of the blog asked if these instructions work also for Python 3.x.

Well, I tried to get Python 3.x working with iPython etc on Mountain Lion following my previous tutorial and it turns out it works!

The Python binary I tested is the python32 package installed via MacPorts. The only thing you need to replace in my instructions is on step 2: you need to replace /usr/bin/python there with python32.

And when running ipython, you need to replace ipython with ipython3.

2 comments:

  1. Well TBH I found a few variations to your guide for python32 from macports. Maybe It's something I'm doing wrong but I could not get it to setup the virtualenv no matter what I did. So I installed the py32-virtualenv port from macports and ran "sudo virtualenv-3.2 /Applications/Python3" which created the virtual environment and installed pip very good.

    From there on I stuck to the guide and it seemed to work out fine.

    Haven't finished yet though. Still installing ipython ATM but CPU is at 100% which seems normal. Will post if something goes wrong. In any other case consider that everything worked fine.

    Not sure if all the warnings are normal but all packs report that have been installed successfully.

    ReplyDelete
  2. Good to know! Thanks for reporting your results.

    ReplyDelete