ModuleNotFoundError no module named mysql (How To Fix)

preview_player
Показать описание
(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)
Рекомендации по теме
Комментарии
Автор

hey guys I could finally solve it buy uninstalling the module and installing it again. Don't know how but worked, so try it if you haven't

antonioesteban
Автор

Thank you so much....I was having this same issue while making my project😊😊😊😊😊😊😊😊👌👌👌👌👌👌

_vyominijoshi
Автор

It helped a lot, thank you very much.

johnataneliasdasilvabatista
Автор

i have used pip mysql-connector but it is shown invalid syntax over m so how can i rectify it

ashokjoshi
Автор

I'm trying to do this for the module "prettytable" and when adding "-connector" I received an error. Do you know how to solve this?

LatinoWebStudio