I have Centos 6 on my server and I've been trying to install a few packages (modules) for it. I just brought the ones on my windows to the ftp client in /usr/lib/python2.6/site-packages
, but when I run my script one of them - lxml gives me an error:
File "plugins/util/http.py", line 12, in <module>
from lxml import etree, html
File "/usr/lib/python2.6/site-packages/lxml/html/__init__.py", line 12, in <module>
ImportError: cannot import name etree
The same code worked perfectly on Windows 7 & Linux Ubuntu 10.04.
Does anyone know why it returns this error? I haven't modified anything, just moved the module from windows to my python2.6 directory on my vps.
@root:
>>> import lxml;print lxml
<module 'lxml' from '/usr/lib/python2.6/site-packages/lxml/__init__.pyc'>
>>>
@ig
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -I/tmp/pip-build/lxml/src/lxml/includes -I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-i686-2.6/src/lxml/lxml.etree.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
import lxml; print lxml
print? – root