【发布时间】:2015-02-27 00:35:06
【问题描述】:
我正在尝试构建一些基于 openmp 的 python 软件 (pynbody)。我可以在我的 mac 笔记本电脑上执行此操作,但是当我在我的 mac 桌面上尝试时,gcc 调用找不到所有 sys 包含(如 _int8.h)。我已经尝试了所有的
python setup.py config -I/...:/...:/...
到
export C_INCLUDE_PATH=/...:/...:/...
但我总是收到(fatal error: sys/_types/_int8_t.h: No such file or directory)。
gcc: pynbody/sph/smooth.cpp
In file included from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/5.0.0/include/stdint.h:9:0,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/inttypes.h:255,
from /Applications/Canopy.app/appdata/canopy-1.5.2.2785.macosx-x86_64/Canopy.app/Contents/include/python2.7/pyport.h:9,
from /Applications/Canopy.app/appdata/canopy-1.5.2.2785.macosx-x86_64/Canopy.app/Contents/include/python2.7/Python.h:58,
from pynbody/sph/kd.h:4,
from pynbody/sph/smooth.h:5,
from pynbody/sph/smooth.cpp:6:
/usr/local/lib/gcc/x86_64-apple-darwin14.0.0/5.0.0/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
In file included from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/5.0.0/include/stdint.h:9:0,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/inttypes.h:255,
from /Applications/Canopy.app/appdata/canopy-1.5.2.2785.macosx-x86_64/Canopy.app/Contents/include/python2.7/pyport.h:9,
from /Applications/Canopy.app/appdata/canopy-1.5.2.2785.macosx-x86_64/Canopy.app/Contents/include/python2.7/Python.h:58,
from pynbody/sph/kd.h:4,
from pynbody/sph/smooth.h:5,
from pynbody/sph/smooth.cpp:6:
/usr/local/lib/gcc/x86_64-apple-darwin14.0.0/5.0.0/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
error: Command "/usr/local/bin/gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -UDEBUG -I/usr/local/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.5.2.2785.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c pynbody/sph/smooth.cpp -o build/temp.macosx-10.6-x86_64-2.7/pynbody/sph/smooth.o -ftree-vectorize -fno-omit-frame-pointer -funroll-loops -fprefetch-loop-arrays -fstrict-aliasing -g -DKDT_THREADING" failed with exit status 1
我的想法已经用完了...有人知道如何让 python 查看一组用户指定的包含目录吗?
【问题讨论】:
-
运行
xcode-select --install- 看来您缺少一些工具。 -
我试过...命令行工具已安装,并且包含在那里。但是python并没有找到它们……它只在一个地方寻找。 -- /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/5.0.0/include
标签: python gcc include-path setup.py