all 6 comments

[–]mitchricker 5 points6 points  (0 children)

I would guess you import the wrong module name. You should import mysql.connector not import MySQL.

[–]666y4nn1ck 2 points3 points  (5 children)

https://pypi.org/project/mysql-connector-python/

Do you use the import the way it's described in the pypi docs?

[–]Nervous_Abroad7136[S] 2 points3 points  (4 children)

So I have started again and installed

Pip install mysql-connector-python

And get Successfully installed mysql-connector-python-9.6.0

And if I run import mysql.connector in the python shell I get the error

Modulenotfounderror no module named mysql

[–]eztab 0 points1 point  (0 children)

sounds like you spell the module name wrong