Amitash
Amitash

Reputation: 1029

Installing matplotlib on Mac OSX Mountain Lion

I am trying to install matplotlib but facing many problems. I am receiving a common error from both pip install matplotlib as well as trying to build from source which is:

BUILDING MATPLOTLIB

        matplotlib: 1.1.1

            python: 2.7.2 (default, Jun 20 2012, 16:23:33)  [GCC 4.2.1

                    Compatible Apple Clang 4.0

                    (tags/Apple/clang-418.0.60)]

          platform: darwin

REQUIRED DEPENDENCIES

             numpy: 1.6.1

                    * Could not find the headers for numpy.  You may

                    * need to install the development package.

EDIT: Solved it finally. I needed to install gfortran and gcc compilers. Did it using brew and everything worked like a charm!

Upvotes: 5

Views: 3946

Answers (4)

Amitash
Amitash

Reputation: 1029

Solved it finally. I needed to install gfortran and gcc compilers. Did it using brew and everything worked like a charm!

Upvotes: 2

tez
tez

Reputation: 5290

macports or brew is the best way for such things on mac.My experience

Upvotes: 0

gcalmettes
gcalmettes

Reputation: 8704

Installing matplotlib on Mountain Lion requires to install the development version of matplotlib.

Try pip install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev

You may need numpy 1.6.2 for it to work.

Generally, for Mountain Lion, you can find great advices and a well described step-by-step procedure to install numpy/scipy/matplotlib/IPhython at this link

Upvotes: 4

Dhaivat Pandya
Dhaivat Pandya

Reputation: 6536

Install numpy.

pip install numpy

It should sort out dependencies for you - I'm not sure why it is not working.

Upvotes: -1

Related Questions