I am trying to learn Python to complete this weeks lab and r
I am trying to learn Python to complete this week\'s lab and receive the following error:
Traceback (most recent call last):
File \"<pyshell#0>\", line 1, in <module>
import mysql.connector
ImportError: No module named \'mysql\'
I have created the module mysql.connector and still receive this error when trying to import it. Can anyone assist?
Solution
python is not configured to be in your PATH environment variable which is necessary for proper installation.
either check the directory ( python/site-packages) or by running terminal command \'which python\' can lead you to the path of directory and check that if the connector is installed or not.
If not download the mysql-connector-python tar file, unzip it.
go inside the mysql-connector-python folder and and run command \'sudo python3 setup.py install\' complete the setup.
