title: Cannot import name 'etree' in Python 3.7, how can I get this working?
body: <p>I'm working through <a href="https://automatetheboringstuff.com/chapter13/" rel="nofollow noreferrer">Automate the Boring Stuff with Python, Chapter 13</a>, and can't figure out how to get the python-docx module working. When I try to import it <code>ImportError: cannot import name 'etree' from 'lxml' (&lt;path&gt;,__init__.py)</code>. Trying <code>from lxml import etree</code> doesn't work either. I've been at this for days, just installed Anaconda which includes libxml2 and libxslt which are required for lxml and still nothing. Any ideas? I'm extremely lost, there's about 4 or 5 different docs involved with this entire process and I can't make sense of any of it.</p>
  
  <p>Here's a couple of <a href="https://stackoverflow.com/questions/ask">StackOverflow</a> questions I've tried bits and pieces from:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/40444671/installing-lxml-libxml2-libxslt-for-python-3-5-on-windows-10">Installing lxml, libxml2, libxslt for Python 3.5 on Windows 10</a> - This is where I decided to install Anaconda thanks to furas's answer</li>
  <li><a href="https://stackoverflow.com/questions/12071547/lxml-cannot-import-etree">LXML: Cannot import etree</a> - From here I tried installing different wheels. I already had <code>lxml</code> installed from <code>pip</code> so it didn't matter anyway, but I learned a bit about wheels so that was good.</li>
  </ul>
  
  <p>I also found a <code>.exe</code> but it was for Python 2.7.</p>
  
  <p>I'm using Python 3.7 64 bit on Windows 10.</p>
  
  <p>Besides the solutions above I have uninstalled and reinstalled these packages in two different directories to no avail.</p>
  
  <p>Okay furas, thank you for the tip, here is the Traceback.</p>
  
  <pre><code>C:\Users\...&gt;py
  Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import lxml
  &gt;&gt;&gt; from lxml import etree
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: cannot import name 'etree' from 'lxml' (C:\Users\...\AppData\Roaming\Python\Python37\site-packages\lxml\__init__.py)
  
  
  **MY PERSONAL SOLUTION:**
  After messing with this for three days I decided to uninstall every Python release I had on my PC and do a clean install. That was the only way for me to get it working, but it worked! No surprises there I think. I'm assuming there was a problem with how I had Python installed because I had two separate directories with different releases and pip was installing packages in a weird way. It doesn't make sense to me but the problem is solved on my end. I don't know if this will help anyone else.
  </code></pre>