[SOLVED] Receive module not found error after i pip mysql.connector

Issue

i run this command pip3 install mysql-connector in Command Prompt and its show this:
C:\Users\pc>pip3 install mysql-connector Requirement already satisfied: mysql-connector in c:\users\pc\appdata\local\prog rams\python\python38\lib\site-packages (2.2.9).
but i still get ModuleNotFoundError: No module named 'mysql' when i import mysql.connector in spyder and pycahrm.

Solution

In Spyder go to Tools > Preferences > Python interpreter, select Use the following Python interpreter: and choose the Python .exe from your other installation.

There is probably a similar setting in Pycharm’s preferences.

Answered By – nekomatic

Answer Checked By – Mildred Charles (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *