6

Hi I'm trying to install matplotlib on my mac. I have lion OS X.

my python version is 2.7.1 ( this is what it says when I run it from terminal)

every time I install matplotlib, it promots this error

matplotlib 1.1.0 cannot be installed on this disk. matplotlib requires System python 2.7 to install. 

I'm new to the python world and I need a tool to graph a few things... so a clear explanation is much appreciated.

Thanks!

3
  • 2
    I've posted a guide to installing matplotlib on osx a few times now, and my instructions have yet to fail. Try that and let me know if it doesn't work? Commented Apr 26, 2012 at 0:08
  • 2
    A more detailed traceback would be helpful. You should be more specific about what method you're using to install steps you took and what error you're getting. Commented Apr 26, 2012 at 1:12
  • @shuzOMGchen hi, I mentioned the error above which is matplotlib 1.1.0 cannot be installed on this disk. matplotlib requires System python 2.7 to install. I'm just installing it using the the excutable it came with from the following link sourceforge.net/projects/matplotlib/files I hope this is clearer! Commented Apr 26, 2012 at 13:01

2 Answers 2

4

You are installing a binary package which is going to expect a specific system python. You are better off building from source.

Just try installing it from pip:

pip install numpy 
pip install matplotlib

If you do not yet have pip, you can install it like this:

wget "http://peak.telecommunity.com/dist/ez_setup.py"
python ez_setup.py
easy_install pip

If any of this fails, then follow @Nolen Royalty's guide that he mentioned in the comments

Sign up to request clarification or add additional context in comments.

Comments

3

I've tried installing python in various different ways to get numpy, scipy, and matplotlib to all work together, and its a huge pain. Your exact version of python will dictate the version of numpy, scipy, and matlplotlib that will work for you.

By far, the easiest solution I have found is to use the pre-built package Enthought. It takes care of all of those problems with one easy installer. You might get some additional software installed like mayavi (an interactive 3d plotting tool), but its not too much.

If you are a student (or have ever been one since the dawn of email), you can download the entire Enthought package for free here. Or you can visit the Enthought home at www.enthought.com. All you have to do is select the academic license and then insert a email that ends in .edu.

I even think there are free trial versions which should solve the issue. I've never tried any of the trial versions, but even if it is a limited time trial, you should be able to use the trial version, and then see exactly which versions of each package you need to install. Its a little more roundabout, but it should work.

1 Comment

Anaconda is also quite good (honestly I immensely prefer Spyder over Enthought's IDE).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.