How do I install Python's matplotlib library for Python 3 on Mac OS X?
-
You forgot this information: What have you tried, what result did you get and what is your expected result? – Lennart Regebro Feb 08 '12 at 08:11
-
@LennartRegebro: I have searched MacPorts, Fink, and Homebrew. I have downloaded the matplotlib source and tried to build it, but soon gave on that. I think I'll mark Thomas K as correct since that looks like the state of affairs for now. I've already upgraded to Python 3, so I'll just have to do my graphs some other way until matplotlib is released for Python 3. – Neil G Feb 08 '12 at 08:16
-
You should still include the information on what have you tried and what result you got. This includes error messages when building, etc. This goes for all questions on stackoverflow. – Lennart Regebro Feb 08 '12 at 08:38
-
@LennartRegebro: You're right. – Neil G Feb 08 '12 at 08:50
-
possible duplicate of [Install MatPlotLib 1.2.x on OS X Lion 10.7.4 and Python 3.2.2](http://stackoverflow.com/questions/10570185/install-matplotlib-1-2-x-on-os-x-lion-10-7-4-and-python-3-2-2) – Neil G May 22 '12 at 00:03
2 Answers
Python 3 support is only available in the development version, it's not yet been released, so you'll probably need to compile it yourself.
Have a look at this readme file about compiling on OS X.

- 39,200
- 7
- 84
- 86
There is, finally, good news for Mac users who want to use matplotlib with python 3 but do not want to compile from the source code. There still is not a MAC mpl build for py3 on the matplotlib site, but Mac Ports now has py32-matplotlib which works with python v3.2.3. I just installed it the usual Mac Port way ['sudo port install py32-matplotlib'] and tested it on a line plot I previously coded with mpl and py v2.7.3. The plot came out okay with py32-matplotlib. Be aware that, if you access the Tkinter module, its name is now tkinter [1st 't' is now lowercase]. If you are unfamiliar with Mac Ports, check out http://astrofrog.github.com/macports-python/

- 84
- 3