Why can't I install lxml for python? -
i have downloaded tarball lxml , using ipython setup.py install try install it. unfortunately giving me screenfuls of error messages:
src/lxml/lxml.etree.c:200651: error: ‘xml_xpath_invalid_operand’ undeclared (first use in function) src/lxml/lxml.etree.c:200661: error: ‘xml_xpath_invalid_type’ undeclared (first use in function) src/lxml/lxml.etree.c:200671: error: ‘xml_xpath_invalid_arity’ undeclared (first use in function) src/lxml/lxml.etree.c:200681: error: ‘xml_xpath_invalid_ctxt_size’ undeclared (first use in function) src/lxml/lxml.etree.c:200691: error: ‘xml_xpath_invalid_ctxt_position’ undeclared (first use in function) src/lxml/lxml.etree.c:200921: error: ‘libxslt_version’ undeclared (first use in function) src/lxml/lxml.etree.c:200933: error: ‘xsltlibxsltversion’ undeclared (first use in function) src/lxml/lxml.etree.c:200945: error: ‘__pyx_v_4lxml_5etree_xslt_doc_default_loader’ undeclared (first use in function) src/lxml/lxml.etree.c:200945: error: ‘xsltdocdefaultloader’ undeclared (first use in function) src/lxml/lxml.etree.c:200954: error: ‘xsltdocloaderfunc’ undeclared (first use in function) src/lxml/lxml.etree.c:200954: error: expected ‘)’ before ‘__pyx_f_4lxml_5etree__xslt_doc_loader’ exception has occurred, use %tb see full traceback. systemexit: error: command 'gcc' failed exit status 1
does know going on here? apparently cython can interfere installation, don't have cython installed on system. on centos 6.4 operating system, ipython running 2.7.
lxml depends on libxml2
, libxslt
. use yum install development headers:
yum install libxml2-devel libxslt-devel python-devel
Comments
Post a Comment