Matplotlib install failure on Mac OSX 10.8 Mountain Lion

前端 未结 11 1025
眼角桃花
眼角桃花 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:04

    I also use mac air with OS X ver 10.8.2.

    Using following commands can get rid of this failure:
    brew install freetype
    brew install libpng
    pip install matplotlib

    That's all. There may be some warning in the installing process, but that does not affect.

    Use following python code to test:

    import matplotlib.pyplot as plt
    plt.plot([1,2,3,4])
    plt.ylabel('some numbers')
    plt.show()  
    

    which is referred from the url: http://matplotlib.org/users/pyplot_tutorial.html.

提交回复
热议问题