Note that there are some explanatory texts on larger screens.

plurals
  1. POi have installed lxml, but when execute "from lxml import etree", i get error "Symbol not found: ___xmlStructuredErrorContext"
    primarykey
    data
    text
    <p>I have installed <code>lxml</code> successfully without any error, according the following two steps, </p> <p><strong>step 1</strong>: When i run "python setup.py build", i have following message printed on the screen,</p> <pre><code>building 'lxml.etree' extension creating build/temp.macosx-10.6-intel-2.7 creating build/temp.macosx-10.6-intel-2.7/src creating build/temp.macosx-10.6-intel-2.7/src/lxml llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/usr/local/include -I/usr/local/include/libxml2 -I/Users/apple/workspace/pythonhome/misc/lxml-3.0.1/src/lxml/includes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -flat_namespace src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_4XSLT_18__call__’: src/lxml/lxml.etree.c:132608: warning: passing argument 1 of ‘__pyx_f_4lxml_5etree_12_XSLTContext__copy’ from incompatible pointer type src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree__copyXSLT’: src/lxml/lxml.etree.c:133997: warning: passing argument 1 of ‘__pyx_f_4lxml_5etree_12_XSLTContext__copy’ from incompatible pointer type src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_4XSLT_18__call__’: src/lxml/lxml.etree.c:132608: warning: passing argument 1 of ‘__pyx_f_4lxml_5etree_12_XSLTContext__copy’ from incompatible pointer type src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree__copyXSLT’: src/lxml/lxml.etree.c:133997: warning: passing argument 1 of ‘__pyx_f_4lxml_5etree_12_XSLTContext__copy’ from incompatible pointer type llvm-gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -L/usr/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.6-intel-2.7/lxml/etree.so building 'lxml.objectify' extension llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/usr/local/include -I/usr/local/include/libxml2 -I/Users/apple/workspace/pythonhome/misc/lxml-3.0.1/src/lxml/includes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.objectify.o -flat_namespace llvm-gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.objectify.o -L/usr/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.6-intel-2.7/lxml/objectify.so </code></pre> <p><strong>step 2</strong>: And after success on executing <code>python setup.py build</code> , I executed <code>python setup.py install</code>, no errors; it seems normal and correct.</p> <p>But when I try the following on the command line, an error occurred?</p> <p>I'm using this in a project based on scapy. </p> <p>Thanks, guys!</p> <pre><code>bash-3.2$ python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; from lxml import etree Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-3.0.1-py2.7-macosx-10.6-intel.egg/lxml/etree.so, 2): Symbol not found: ___xmlStructuredErrorContext Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-3.0.1-py2.7-macosx-10.6-intel.egg/lxml/etree.so Expected in: flat namespace in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml-3.0.1-py2.7-macosx-10.6-inte </code></pre> <p>And finally i have tried this, but still, I get and error from <code>from lxml import etree</code>, in the python shell:</p> <pre><code>bash-3.2$ pip install lxml-2.3.5.tgz Unpacking ./lxml-2.3.5.tgz Running setup.py egg_info for package from file:///Users/apple/workspace/pythonhome/misc/lxml-2.3.5.tgz Building lxml version 2.3.5. Building with Cython 0.17. Using build configuration of libxslt 1.1.27 Building against libxml2/libxslt in the following directory: /usr/local/lib warning: no previously-included files found matching '*.py' Installing collected packages: lxml Running setup.py install for lxml Building lxml version 2.3.5. Building with Cython 0.17. Using build configuration of libxslt 1.1.27 Building against libxml2/libxslt in the following directory: /usr/local/lib skipping 'src/lxml/lxml.etree.c' Cython extension (up-to-date) building 'lxml.etree' extension llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/usr/local/include -I/usr/local/include/libxml2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace llvm-gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -L/usr/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.6-intel-2.7/lxml/etree.so skipping 'src/lxml/lxml.objectify.c' Cython extension (up-to-date) building 'lxml.objectify' extension llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/usr/local/include -I/usr/local/include/libxml2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.objectify.o -w -flat_namespace llvm-gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.objectify.o -L/usr/local/lib -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.6-intel-2.7/lxml/objectify.so Successfully installed lxml Cleaning up... bash-3.2$ python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import lxml &gt;&gt;&gt; import html Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; ImportError: No module named html &gt;&gt;&gt; from lxml import html Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/html/__init__.py", line 12, in &lt;module&gt; from lxml import etree ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so, 2): Symbol not found: _exsltDateXpathCtxtRegister Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so Expected in: flat namespace in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload