I am using Anaconda v4.2 with Python 3.5 on Windows 32 bit and want to use lxml etree. My Anaconda distribution includes lxml 3.6.4, but the only lxml function that my IDE (PyCharm, although I get the same error when running the code with Jupyter Notebook), can see get_include (). The following code:
import lxml
full_xml_tree = lxml.etree.parse('myfile.xml')
just gives me an error:
AttributeError: module 'lxml' has no attribute 'etree'
I also tried installing the VisualC ++ compiler for Windows, but that didn't make any difference. I tried reinstalling lxml using conda on the command line, again no change in my error. What am I missing? It seems that the lxml.get_include () function does not find any files to include, and I really don’t understand how the etree.cp35-win32.pyd file (which I assume contains the compiled etree code?) Should be associated with lxml package. Any help is much appreciated!
Katie
source
share