I'm using python 3.10. I want to use MySQL database, but whenever I am trying to import the module it throws the error. I am using MAC OS. There are certain file for windows to import but I wasn't able to find solution for Mac OS.
ImportError: No module named flask_mysqldb
from flask_mysqldb import MySQL
do you have flask_mysqldb installed on your work environment? if not
Create a virtual environment for your script using the command
pip3 install virtualenv
virtualenv "desired name for virtual environment"
pip install flask-mysqldb.
from flask import Flask
from flask_mysqldb import MySQL
Reference: https://flask-mysqldb.readthedocs.io/en/latest/