Unable to import mysql.connector in a Python venv session
You might want to check out the following article: 

Can not get mysql-connector-python to install in virtualenv (Stackoverflow) 

The accepted answer states the following:


  Several things. There is an inconsistency in package naming so you may want to do:

pip search mysql-connector

  
  to find out what it is called on your platform. I got two results mysql-connector-python and mysql-connector-repackaged.
  
  so try this first:

pip install mysql-connector-python  

  
  this may additionally give an error like this:

Some externally hosted files were ignored (use 
  --allow-external mysql-connector-python to allow).  

  
  so finally this should do the job:

pip install mysql-connector-python --allow-external mysql-connector-python