Python 2.7.10 的 Lxml 安装错误
Lxml installation error for Python 2.7.10
正在尝试在 mac osx yosemite 上为 python 2.7.10
安装 lxml
使用命令 pip install lxml,我收到:/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10:致命错误:'stdio.h' 找不到文件
#包括
^
产生 1 个错误。
错误:命令“/usr/bin/clang”失败,退出状态为 1
完全错误:命令“/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;file='/private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record [=35= .txt --single-version-externally-managed --compile" 在 /private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml
中失败,错误代码为 1
我已经搜索过,但找不到解决方案。有人可以给我指出正确的方向吗?
如果您安装了 xcode,请尝试以下操作
$xcode-select --install
您也可以尝试通过 homebrew
安装 python
$brew install python
查看这些与您的问题相关的链接。
Fatal error: #include <stdio.h> generated after "pip install mysql-python" command
GCC fatal error: stdio.h: No such file or directory
正在尝试在 mac osx yosemite 上为 python 2.7.10
安装 lxml使用命令 pip install lxml,我收到:/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10:致命错误:'stdio.h' 找不到文件 #包括 ^ 产生 1 个错误。 错误:命令“/usr/bin/clang”失败,退出状态为 1
完全错误:命令“/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;file='/private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record [=35= .txt --single-version-externally-managed --compile" 在 /private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml
中失败,错误代码为 1我已经搜索过,但找不到解决方案。有人可以给我指出正确的方向吗?
如果您安装了 xcode,请尝试以下操作
$xcode-select --install
您也可以尝试通过 homebrew
安装 python $brew install python
查看这些与您的问题相关的链接。
Fatal error: #include <stdio.h> generated after "pip install mysql-python" command
GCC fatal error: stdio.h: No such file or directory