我一直在尝试在 OSX 10.9 Mavericks 上安装 GalSim 并安装 Anaconda 并将其设置为默认 python,但遇到以下错误:
Unable to build a python loadable module using the python executable:
/usr/bin/env python,
the library name libpython2.7.a,
and the libdir //anaconda/lib/python2.7/config.
If these are not the correct library names, you can tell scons the
correct names to use with the flags EXTRA_LIB_PATH and/or EXTRA_LIBS.
检查我的 config.log 文件时,有一些 的实例Undefined symbols for architecture x86_64:
,即使我确保使用的编译器是clang++
,正如 GalSim 常见问题解答中所建议的那样。
还有很多这样的例子:
/usr/bin/env python < .sconf_temp/conftest_73 > .sconf_temp/conftest_73.out
Fatal Python error: PyThreadState_Get: no current thread
sh: line 1: 17019 Abort trap: 6 /usr/bin/env python < ".sconf_temp/conftest_73" > ".sconf_temp/conftest_73.out"
我不知道该怎么做才能纠正这种情况。我已经重新安装了 Boost 几次,./b2 -a
在第一次之后每次都使用该命令。我确保 boost 正在引用/anaconda/bin/python
,并通过检查每个安装的 project-config.jam 文件来确认它。我已经使用了命令
./bootstrap.sh
./b2 -a toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install
按照 GalSim 常见问题解答中的建议。除了尝试重新安装所有必需的软件包之外,我真的不确定还能尝试什么。在我去最后的手段之前,有人对我应该做什么有任何建议吗?任何帮助表示赞赏。
以下是我上次运行的 scons 的输出:
scons: Reading SConscript files ...
SCons is version 2.3.1 using python version 2.7.6
Python is from //anaconda/include/python2.7
Using the following (non-default) scons options:
CXX = clang++
These can be edited directly in the file gs_scons.conf.
Type scons -h for a full list of available options.
Using python = /usr/bin/env python
Using default PYPREFIX = //anaconda/lib/python2.7/site-packages
Using compiler: /usr/bin/clang++
compiler version: 5.1
Determined that a good number of jobs = 2
Checking for C++ header file fftw3.h... yes
Checking for correct FFTW linkage... yes
Checking for boost header files... yes
Checking for C++ header file TMV.h... yes
Using TMV_LINK file: /usr/local/share/tmv/tmv-link
-ltmv -lblas
Mac version is 10.9.3
XCode version is 5.1.1
Checking for correct TMV linkage... (this may take a little while)
Checking for correct TMV linkage... yes
Checking if we can build against Python...
Unable to build a python loadable module using the python executable:
/usr/bin/env python,
the library name libpython2.7.a,
and the libdir //anaconda/lib/python2.7/config.
If these are not the correct library names, you can tell scons the
correct names to use with the flags EXTRA_LIB_PATH and/or EXTRA_LIBS.
Please fix the above error(s) and rerun scons.
Note: you may want to look through the file INSTALL.md for advice.
Also, if you are having trouble, please check the INSTALL FAQ at
https://github.com/GalSim-developers/GalSim/wiki/Installation%20FAQ