我正在尝试构建一些基于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查看一组用户指定的包含目录?
答案 0 :(得分:0)
使用Finder查看您是否有标题。如果这样做,则需要将sys目录的位置添加到包含路径中。
答案 1 :(得分:0)
您可以在setup.cfg中调整这些目录。