scipy osx 10.9 can't load gfortran library

I have tried installing scipy with pip and brew and both installs give this error

ImportError: dlopen(/usr/local/lib/python2.7/site-packages/sklearn/linear_model/cd_fast.so, 2): Library not loaded: /usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.3/libgfortran.3.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/sklearn/linear_model/cd_fast.so
  Reason: image not found

looking for the offending library shows a version for a different archetecture available:

administrators-iMac-3:sourcefind_python bill$ locate libgfortran.3.dylib
/Applications/MATLAB_R2013a.app/sys/os/maci64/libgfortran.3.dylib
/usr/local/Cellar/gcc/4.8.3_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.3/i386/libgfortran.3.dylib
/usr/local/Cellar/gcc/4.8.3_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.3/libgfortran.3.dylib

I did try to place a symlink at /usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.3/libgfortran.3.dylib to point to usr/local/Cellar/gcc/4.8.3_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.3/libgfortran.3.dylib but this gave me an error 'wrong architecture'

Does anyone have any suggestions for getting this to work?


Scikit-learn is looking for an old version of the fortran library. You should reinstall scikit-learn.


你应该重新安装numpy和scipy。

链接地址: http://www.djcxy.com/p/75472.html

上一篇: 自制软件不能在OSX上工作

下一篇: scipy osx 10.9无法加载gfortran库