scipy osx 10.9无法加载gfortran库

时间:2014-06-28 10:11:43

标签: python macos scipy fortran homebrew

我尝试使用pip和brew安装scipy,两个安装都会出现此错误

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

查找有问题的库显示了可用的其他原型的版本:

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

我确实尝试在/usr/local/lib/gcc/x86_64-apple-darwin12.5.0/4.8.3/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但这给了我一个错误'错误的架构'

有没有人建议让它发挥作用?

2 个答案:

答案 0 :(得分:1)

Scikit-learn正在寻找旧版本的fortran库。你应该重新安装scikit-learn。

答案 1 :(得分:1)

你应该重新安装numpy和scipy。