ImportError: cannot import name 'etree' from 'lxml'

created at 06-27-2021 views: 80
  1. First check whether lxml is installed ----> I found it has been installed normally
  2. 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
  3. After the installation, continue to run the code, but still report ImportError: cannot import name ‘etree’ from ‘lxml’
  4. 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
  5. Continue to run --> problem solving
created at:06-27-2021
edited at: 06-27-2021: