I am fairly new to python and I am trying to write a script that would read and write to a mysql table. I have installed mysql-connector on python3 and I got the script working yesterday. It successfully read and wrote data to mysql. When I ran it today, this error came up. ModuleNotFoundError: No module named 'mysql'
I already checked the following things:
Does someone have any idea on what is happening?
check if mysql-connector is installed: python -m pip freeze. It is probably not listed. You can install it with:
pip install mysql-connector
or
python -m pip install mysql-connector
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.