Debian Buster: ModuleNotFoundError: No module named 'mysql'
rackflot at gmail.com
rackflot at gmail.com
Thu May 7 07:30:26 EDT 2020
I have the same issue. I use visual code from Ms and the remote debugging over an ssh.
I am able to do all mysql while in the debugger but running on command line does not work.
The DB is logged in as root as this was the only way I could make it work.
pi at raspberrypi:~/blescan/iBeacon-Scanner-$ pip search mysql-connector | grep --color mysql-connector-python
mysql-connector-python (8.0.20) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
pi at raspberrypi:~/blescan/iBeacon-Scanner-$ pip install mysql-connector-python-rf
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: mysql-connector-python-rf in /home/pi/.local/lib/python3.7/site-packages (2.2.2)
pi at raspberrypi:~/blescan/iBeacon-Scanner-$ sudo python3 BeaconClass.py
Traceback (most recent call last): File "BeaconClass.py", line 7, in <module>
import mysql.connector as mariadb ModuleNotFoundError: No module named 'mysql'
pi at raspberrypi:~/blescan/iBeacon-Scanner-$
More information about the Python-list
mailing list