Error: ModuleNotFoundError: No module named ‘mysql’ . While executing the Python program which uses the MySQL import statement returns the following error:
Traceback (most recent call last):
File "C:\Users\E3019447\.spyder-py3\untitled9.py", line 8, in <module>
import mysql.connector
ModuleNotFoundError: No module named 'mysql'
Cause: PIP package for Mysql is not installed.
Solution: Install the pip package for MySQL.
pip install mysql-connector-python