Mac OS环境问题: fatal error: limits.h: No such file or directory
2018-11-06 09:39:27
编程
1551views
在安装Python三方库dateparser的时候,出现了如下问题
anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
我的系统是MacOSX10.14
。解决方法如下
-
安装 xcode command tool。如果通过命令行安装失败,那么可以去官网下载对应版本的command line tool
xcode-select --install
-
查看是否有/usr/include
这个目录
cat /usr/include
-
如果不存在该目录,那么建立一个软连接。注意下面的MacOSX10.14.sdk
是根据操作系统版本命名的,如果你不清楚具体是什么,可以先cd到上级目录/Applications/xxxx/Developer/SDKs
,再使用ls
查看,运行ln
命令
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include /usr/include