ImportError: cannot import name 'etree' from 'lxml'
created at 06-27-2021
views: 80
- First check whether lxml is installed ----> I found it has been installed normally
- After searching online, I found that someone had the same situation as me, saying that there was no
etree
in some lxml
packages ----> reinstalled lxml correctly according to the online solution
- After the installation, continue to run the code, but still report
ImportError: cannot import name ‘etree’ from ‘lxml’
- I accidentally remembered the mistakes that someone had said about naming when searching the Internet before, and found that it was because I had an
lxml.py
file ----> change the file name
- Continue to run --> problem solving
related posts