Python LXML ETREE on CentOS 6.3

I have Centos 6 on my server and I have been trying to install some packages (modules) for it. I just brought the ones on my window to /usr/lib/ python2 .6/site-packages ftp client, but when I run my script, one of the –lxml gives me an error:

File " plugins/util/http.py", line 12, in 
from lxml import etree, html
File "/usr/lib/python2.6/site-packages/lxml/html/__init__ .py", line 12, in
ImportError: cannot import name etree

The same code runs perfectly on Windows 7 and Windows 7. Linux Ubuntu 10.04.

< p> Does anyone know why it returns this error? I did not modify anything, just moved the module from windows to the python2.6 directory on my vps.

@根:

>>> import lxml;print lxml

>>>

@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

Cannot execute gcc: No such file or directory

Error: Command’gcc’ failed, exit status is 1

or install it from EPEL (the easiest way):

# install EPEL if you don’t have it yet
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# instal python-lxml
sudo yum -y install python-lxml

I have Centos 6 on my server and I have been trying for it Install some packages (modules). I just brought those on my window to the ftp client in /usr/lib/python2.6/site-packages, but when I run my script, one of them –lxml Gave me an error:

File "plugins/util/http.py", line 12, in 
from lxml import etree, html
File "/usr/lib/python2.6/site-packages/lxml/html/__init__.py", line 12, in
ImportError: cannot import name etree

The same code works perfectly on Windows 7 and Windows 7. Linux Ubuntu 10.04.

Does anyone know why it returns this error? I did not modify anything, just moved the module from windows to the python2.6 directory on my vps.

@根:

>>> import lxml;print lxml

>>>

@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

Cannot execute gcc: No such file or directory

Error: Command’gcc’ failed, exit status is 1

p>

Or install it from EPEL (the easiest way):

# install EPEL if you don't have it yet
sudo rpm -Uvh ht tp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# instal python-lxml
sudo yum -y install python-lxml

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 500 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.