How to install Scipy with pip on Mac Mountain Lion OS X v10.8

前端 未结 9 1698
天涯浪人
天涯浪人 2020-12-03 14:13

I\'m having serious difficulty installing Scipy with pip on Mountain Lion. I\'ve tried:

sudo pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev
         


        
9条回答
  •  Happy的楠姐
    2020-12-03 14:44

    Here is what worked for me for pip installing matplotlib and scipy inside a virtual environment (Mac OS X 10.9.2 Mavericks):

    # See George's answer above
    brew update
    brew upgrade
    brew install gfortran 
    
    # See http://www.scipy.org/scipylib/building/macosx.html (the link Nathan Gould posted above)
    export CXX=g++-5.1
    export CC=gcc-5.1
    export FFLAGS=-ff2c
    sudo ln -s /usr/bin/gcc /usr/bin/gcc-5.1
    sudo ln -s /usr/bin/g++ /usr/bin/g++-5.1
    
    pip install matplotlib
    pip install scipy
    

    matplot lib installed quickly, but scipy took a long time.

提交回复
热议问题