OSX anaconda虚拟环境py27,安装编译MySQLdb出现fatal error: limits.h: No such file or directory
2017-09-29 11:40
330 查看
(py27) ➜ MySQL-python-1.2.3 python setup.py build running build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.7-x86_64-2.7/MySQLdb running build_ext building '_mysql' extension gcc -fno-strict-aliasing -I/Users/kris/anaconda3/envs/py27/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/Users/kris/anaconda3/envs/py27/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-x86_64-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64 In file included from /Users/kris/anaconda3/envs/py27/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0, from /Users/kris/anaconda3/envs/py27/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34, from /Users/kris/anaconda3/envs/py27/include/python2.7/Python.h:19, from pymemcompat.h:10, from _mysql.c:29: /Users/kris/anaconda3/envs/py27/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 #include_next <limits.h> /* recurse down to the real one */ ^ compilation terminated. error: command 'gcc' failed with exit status
确保OSX已经安装xcode命令行工具:
xcode-select --install
确认接受弹出的对话框,进行安装。
That will install system headers into standard locations expected by tools like gcc, e.g.
/usr/include.
重新pip install MySQLdb,安装成功。
相关文章推荐
- 关于安装MySQLdb出现fatal error: my_config.h: No such file or directory
- BUG:给Nexus7编译Android4.2的时候出现 fatal error: map: No such file or directory
- Android 源码编译Linux内核时出现fatal error: linux/netfilter/xt_dscp.h: No such file or directory
- eclipse编译出现fatal error: gnu/stubs.h: No such file or directory解决方法
- QT编译出现fatal error: QApplication: No such file or directory
- BUG:给Nexus7编译Android4.2的时候出现 fatal error: map: No such file or directory
- make时出现fatal error: mysql.h: No such file or directory
- ubuntu安装Java出现bash: ./java: No such file or directory的解决
- 编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”
- s3c2440 安装工具链出现No such file or directory
- Erlang 编译时出现"no such file or directory" 与 当前工作目录问题
- ubuntu 编译是出现 error: openssl/rsa.h: No such file or directory
- 安装tinyos后,出现Python.h:No such file or directory错误的解决方案
- CentOS编译安装软件过程中遇到zlib.h: No such file or directory
- 编译fdk-aac,执行批处理的时候出现这个错误,mingw32-gcc.exe: error: CreateProcess: No such file or directory的问题
- Cacti安装nginx状态监控时出现No such file or directory错误的解决办法
- SlickEdit在64bit Ubuntu下运行vsinst安装程序出现"No such file or directory"的解决方法
- 安装nodejs和grunt以后出现 /usr/bin/env: node: No such file or directory
- 在安装VMware-tools出现bash:./vmware-install.pl :/usr/bin/perl:bad interpreter:No such file or directory.
- cocoapods安装出现env: ruby_executable_hooks: No such file or directory(已解决)