升级到macOS Mojave后出现编译错误致命错误:limits.h:没有此类文件或目录

时间:2018-10-25 01:06:55

标签: python c macos cython macos-high-sierra

将我的Mac OS从macOS High Sierra升级到macOS Mojave(版本10.14)后,我在运行脚本时遇到错误(在升级之前,我能够正常运行。)目前,我正在运行python 2.7。 15,使用conda作为环境管理器,并在macOS 10.14 Mojave中全部安装了gcc 5.3.0。

这是我正在运行的软件(Cython)(https://github.com/sidd0529/COSMOS_Lens

该软件包以前运行时(使用python setup.py build_ext --inplace)运行得很好。但是,当我现在运行它时,遇到以下错误:

gcc -fno-strict-aliasing -I/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/anaconda2/include/python2.7 -c cosmos_cy.c -o build/temp.macosx-10.6-x86_64-2.7/cosmos_cy.o -O3
In file included from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.3.0/include-fixed/syslimits.h:7:0,
             from /usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.3.0/include-fixed/limits.h:34,
             from /anaconda2/include/python2.7/Python.h:19,
             from cosmos_cy.c:4:
/usr/local/lib/gcc/x86_64-apple-darwin15.0.0/5.3.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

我实现了this linkxcode-select --install)中给出的建议,但这是行不通的。我在计算机上卸载了Anaconda,然后再次将其重新安装,但这也不能解决问题。

如果有人能告诉我该如何做才能再次正确运行此程序包,我将非常感谢。

0 个答案:

没有答案