Django: cannot install lxml
Here’s a way to fix this problem.
Error:
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-i686-2.7/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command ‘gcc’ failed with exit status 1
Solution:
Make sure that the development packages of libxml2 and libxslt are installed in your local machine
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
*also install python2.7-dev
sudo apt-get install python2.7-dev
No comments:
Post a Comment