title: Python 3 mySQL.connector frozen import lib
body: <p>I am new to Python 3 and still learning but I need help.  The first part of the script is:</p>
  
  <p><code>import mysql.connector #this is failing as a .py but works in the shell</code></p>
  
  <p><code>cnx = mysql.connector.connect(user='root', password='mypassword', host='my_ip_address', database'name_of_database') #this works in the shell</code></p>
  
  <p><code>cursor = cnx.cursor()</code></p>
  
  <p>I have tried the above line by line in the Python shell which works fine: I can import the connector to connect to my database and fetch back data.  But when I save the script as a .py the <code>import mysql</code> connector does not work. I do have the Path variable setup and when I installed the mySQL connector it placed the relevant files in my Python install path \Lib\site-pacakges folder.</p>
  
  <p>I get the following error:</p>
  
  <pre><code>&gt;Traceback (most recent call last):
  &gt; File "&lt;frozen importlib._bootstrap&gt;", line 1518, in _find_and_load_unlocked
  AttributeError: 'module' object has no attribute '__path__'
  </code></pre>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <pre><code>&gt;Traceback (most recent call last):
  &gt;  File "C:\Users\Paul\Desktop\scripts\mysql.py", line 2, in &lt;module&gt;
  &gt;    import mysql.connector
  &gt;  File "C:\Users\Paul\Desktop\scripts\mysql.py", line 2, in &lt;module&gt;
  &gt;    import mysql.connector
  &gt;ImportError: No module named 'mysql.connector'; mysql is not a package
  </code></pre>