Installing (build) matplotlib in mac osx lion

前端 未结 1 732
温柔的废话
温柔的废话 2021-02-03 14:50

I installed pynum and scipy (on osx Lion with python 2.7), but when I tried to build matplotlib

git clone https://github.com/matplotlib/matplotlib.git
cd matplo         


        
1条回答
  •  爱一瞬间的悲伤
    2021-02-03 15:47

    I always find this process more painful than it should be, but I've done it a few times now and I believe that these steps should get you set up:

    1. Get Xcode 4.3.2, it's required for some of the later steps.
    2. Download the latest version of python for OSX from python.org
    3. Grab the Scipy superpack.
    4. Uninstall any previous versions of numpy/matplotlib/scipy that you currently have. That includes doing cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ and moving any numpy/matplotlib/scipy directories or eggs into a temp directory.
    5. cd ~/Downloads(or wherever you downloaded the superpack script to) and run sh install_superpack.sh. Answer no to the question are you installing from a repository cloned to this machine or you'll be confused about why the script keeps failing.

    That should be it! You should now be able to boot up the python console and import numpy, scipy, matplotlib.

    0 讨论(0)
提交回复
热议问题