import mysql.connector, ModuleNotFoundError: No module named 'mysql'

50 Views Asked by At

I am encountering an issue with a ModuleNotFoundError when trying to import the mysql.connector module in my Python script. I have already installed the module using pip install mysql-connector-python, but I still can't seem to resolve the error.

1.Checked Python version: 3.11.1

2.Executed pip show mysql-connector-python:

Name: mysql-connector-python

Version: 8.3.0

Summary: MySQL driver written in Python.

3.Checked virtual environment activation:

Virtual environment is activated.

4.Reinstalled MySQL Connector:

pip uninstall mysql-connector-python  
pip install mysql-connector-python
0

There are 0 best solutions below