ImportError: /home/[USER]/.local/lib/python3.8/site-packages/lxml/etree.cpython-38-x86_64-linux-gnu.so: undefined symbol: PyExc_ImportError
Out of curiosity I tried to build lxml from source (which did not succeed) and stumbled upon something that might be related to that error. When Cythonizing src/lxml/etree.pyx warnings occur that the local variable 'args' is referenced before assigned (see below).
user@host:~/lxml-lxml-lxml-4.7.1-11-gac829d5/lxml-lxml-ac829d5$ python3 setup.py build --with-cython
Building lxml version 4.7.1.
Building with Cython 0.29.27.
Building against libxml2 2.9.10 and libxslt 1.1.34
Compiling src/lxml/etree.pyx because it changed.
Compiling src/lxml/objectify.pyx because it changed.
Compiling src/lxml/builder.py because it changed.
Compiling src/lxml/_elementpath.py because it changed.
Compiling src/lxml/html/diff.py because it changed.
Compiling src/lxml/html/clean.py because it changed.
Compiling src/lxml/sax.py because it changed.
[1/7] Cythonizing src/lxml/_elementpath.py
[2/7] Cythonizing src/lxml/builder.py
[3/7] Cythonizing src/lxml/etree.pyx
warning: src/lxml/xmlerror.pxi:657:22: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:658:69: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:659:20: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:664:22: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:665:73: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:666:20: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:671:22: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:672:73: local variable 'args' referenced before assignment
warning: src/lxml/xmlerror.pxi:673:20: local variable 'args' referenced before assignment
[4/7] Cythonizing src/lxml/html/clean.py
[5/7] Cythonizing src/lxml/html/diff.py
[6/7] Cythonizing src/lxml/objectify.pyx
[7/7] Cythonizing src/lxml/sax.py
System information:
lxml.etree : (4, 7, 1, 0)
libxml used : (2, 9, 12)
libxml compiled : (2, 9, 12)
libxslt used : (1, 1, 34)
libxslt compiled : (1, 1, 34)
_______________________________________________ lxml - The Python XML Toolkit mailing list -- lxml@python.org To unsubscribe send an email to lxml-le...@python.org https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: arch...@mail-archive.com