ModuleNotFoundError no module named mysql (How To Fix)



ModuleNotFoundError no module named mysql (How To Fix)

ModuleNotFoundError no module named mysql (How To Fix)

Sign Up 👻👻👉 https://semicolon.dev/YouTube
(We’re free online community, meet other makers!)

ModuleNotFoundError no module named mysql

# 👇️ in a virtual environment or using Python 2
pip install mysql

# 👇️ for python 3 (could also be pip3.10 depending on your version)
pip3 install mysql

# 👇️ if you get permissions error
sudo pip3 install mysql

# 👇️ if you don’t have pip in your PATH environment variable
python -m pip install mysql

# 👇️ for python 3 (could also be pip3.10 depending on your version)
python3 -m pip install mysql

# 👇️ for Anaconda
conda install -c anaconda mysql

#python #pythontutorial #mysql
Quick solution:
1. pip install mysql
2. pip install mysql-connector
Now it should work

00:00 How to fix ModuleNotFoundError no module named mysql error
00:06 Import MySQL in your python program and open it in VSCode
00:10 Running the program but getting ModuleNotFoundError no module named mysql error – how to fix it?
00:23 pip install mysql (how to install mysql for python)
00:52 pip install mysql-connector (how to install mysql connector in python)

Comments are closed.