I am having difficulty using lxml
and h5py
together in the same package. When they have both been imported, even if they are not imported in the same file, calling lxml.etree.parse()
always segfaults.
In [1]: from lxml import etree
In [2]: parser = etree.XMLParser(dtd_validation=True, attribute_defaults=True)
In [3]: etree.parse('foo.xml', parser)
Out[3]: <lxml.etree._ElementTree at 0x1bb9638>
versus
In [1]: import h5py
In [2]: from lxml import etree
In [3]: parser = etree.XMLParser(dtd_validation=True, attribute_defaults=True)
In [4]: etree.parse('foo.xml', parser)
Segmentation fault
Switching the order of imports does not seem to matter. Any thoughts on avoiding this while still importing both packages?
Edit: Adding a bit of info that I should have added before. The same thing happens if this is done in a script rather than IPython.