Python设置.py生成找不到g的标准include

2024-05-13 02:21:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试构建一些基于openmp的python软件(pynbody)。我可以在我的mac笔记本电脑上执行此操作,但是当我在mac桌面上尝试时,gcc调用找不到所有sys include(比如int8.h)。我什么都试过了

python setup.py config -I/...:/...:/...

^{pr2}$

但我总是得到(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查看一组用户指定的include目录吗?在


Tags: fromappincludelibusrlocalx86macosx
2条回答

使用Finder查看是否有标题。如果这样做,则需要将sys目录的位置添加到include路径中。在

您可以在中调整这些目录设置.cfg. 在

相关问题 更多 >