title: ImportError: No module named mysql.connector using Python2
body: <p>I have two files. The first one has the connection and the getting of data. I import mysql.connector. This file is called tasksSql.py</p>
  
  <pre><code>def get_users():
      import mysql.connector
  
      con = mysql.connector.connect(user='****', password='*****',
                                    host='127.0.0.1',
                                    database='tasks')
      c = con.cursor()
  
      users = []    
      c.execute("""SELECT * FROM task_user""")
  
      for row in c:
          user = {
              'id': row[0],
              'first': row[1],
              'last': row[2],
              'email': row[3],
              'password': row[4],
              'creation_date': row[5]
          }
          users.append(user)
      c.close()
      return users
  </code></pre>
  
  <p>When I run this file singly it works and returns data.</p>
  
  <p>I have another file named tasks.py where I am going to be importing this file, however, this isn't working! When I import the file, it gives me the error:</p>
  
  <pre><code>ImportError: No module named mysql.connector
  </code></pre>
  
  <p>What am I doing wrong?</p>