Install Numpy on Mac OS X Lion 10.7

前端 未结 9 1033
萌比男神i
萌比男神i 2020-12-18 10:27

I need to install Numpy on my Mac OS X Lion 10.7. I googled a little bit, it seems like there are a lot of stuff needs to be installed. And some says I need install Xcode be

相关标签:
9条回答
  • 2020-12-18 11:09

    Based on this post, I found that Chris Fonnesbeck keeps a highly functional installer script for OSX 10.7 at the OSX SuperPack Github site.

    Because I hapened to have all the dependencies (such as gfortran) already, I did not use his full shell script. Rather I just did

    git clone --depth=1 git://github.com/fonnesbeck/ScipySuperpack.git  
    python -m easy_install -N -Z ScipySuperpack/*.egg   
    

    And it worked beautifully. In particular, it worked better than the .dmg files from the official numpy and scipy distributions, and better than pip install.

    0 讨论(0)
  • 2020-12-18 11:15

    You can install numpy/scipy using pip, If pip is not installed on your machine, you can install it with easy_install:

    sudo easy_install pip
    

    Then install numpy:

    sudo pip install numpy
    
    0 讨论(0)
  • 2020-12-18 11:17

    The easiest way that I found was to visit http://sourceforge.net/projects/numpy/files/NumPy/, pick the folder of the latest version, and then download the .dmg file that matched my installed version of Python.

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