我的 mac (10.9) 上安装了 anaconda python 发行版。我正在尝试安装ffnet包和SpacePy包,但这样做时遇到了麻烦。这是我在执行 sudo easy_install ffnet 时遇到的错误:
ld: library not found for -lbundle1.o
collect2: erreur: ld a retourné 1 code d'état d'exécution
ld: library not found for -lbundle1.o
collect2: erreur: ld a retourné 1 code d'état d'exécution
error: Setup script exited with error: Command "/usr/local/bin/gfortran -Wall -m64 -Wall -undefined dynamic_lookup -bundle build/temp.macosx-10.5-x86_64-2.7/build/src.macosx-10.5-x86_64-2.7/ffnet/fortran/_ffnetmodule.o build/temp.macosx-10.5-x86_64-2.7/build/src.macosx-10.5-x86_64-2.7/fortranobject.o build/temp.macosx-10.5-x86_64-2.7/src/fortran/ffnet.o build/temp.macosx-10.5-x86_64-2.7/build/src.macosx-10.5-x86_64-2.7/ffnet/fortran/_ffnet-f2pywrappers.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin13/4.8.2 -lgfortran -o build/lib.macosx-10.5-x86_64-2.7/ffnet/fortran/_ffnet.so" failed with exit status 1
/Users/nau/anaconda/lib/python2.7/site-packages/numpy/distutils/misc_util.py:252: RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import
from numpy.distutils import log
尝试安装 spacepy 软件包时,我遇到了相同的“找不到 -lbundle1.o 的库”错误。
我的 mac 上确实有以下文件:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/bundle1.o
我试图建立一个符号链接:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libbundle1.o -> bundle1.o
如果 -lbundle1.o 正在寻找 libbundle1.o 而不是 bundle1.o 并且有相同的错误