I've used venv to create a virtual environment for Python 3.5.2. I have installed the mysql.connector
. The connector works fine as long as I am not in an activated venv environment.
from mysql.connector import MySQLConnection, Error
from python_mysql_dbconfig import read_db_config
With these statements I get the following:
Traceback (most recent call last):
File "fetchone.py", line 1, in <module>
from mysql.connector import MySQLConnection, Error
ImportError: No module named 'mysql.connector'
I have searched for a solution but most are dated several years ago. Like I said, the mysql.connector
is located and works fine outside of the venv environment