Matplotlib install failure on Mac OSX 10.8 Mountain Lion

前端 未结 11 1026
眼角桃花
眼角桃花 2020-12-23 02:21

I tried to install matplotlib on my MacBook Air, but it always gives me this error message:

 Processing matplotlib-1.1.1_notests.tar.gz
 Running matplotlib-1         


        
11条回答
  •  暖寄归人
    2020-12-23 03:00

    The following worked for matplotlib installation after installing python according to instructions from thegreenroom. Those instructions didn't work for me after I installed Python. I followed the instructions from Scipy.org to install numpy and scipy. Then I did (adapted from above answer):

    brew install freetype
    brew install libpng
    

    However I got the same error message whether I installed with pip install matplotlib or trying to install from source, doing

    python setup.py build
    python setup.py install
    

    in the matplotlib directory I cloned via git clone https://github.com/matplotlib/matplotlib.git.

    The error persisted until I ran

    brew link freetype
    

    Then from the cloned matplotlib directory I ran

    python setup.py build
    python setup.py install
    

    And the installation succeeded.

提交回复
热议问题