Trying to install lxml on mac osx yosemite for python 2.7.10
Using command pip install lxml, I receive: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found #include ^ 1 error generated. error: command '/usr/bin/clang' failed with exit status 1
Complete error: Command "/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 /var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-8QC6OG-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/h2/hwn1y9sd54b6tl2wyb6vc_kh0000gp/T/pip-build-St5xbb/lxml
I have searched and cannot find a solution. Can someone please point me in the right direction?
if you have xcode installed try the following
$xcode-select --install
You could also try installing python via homebrew
$brew install python
See these links that are related to you problem.
Fatal error: #include <stdio.h> generated after "pip install mysql-python" command
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.