Install the driver MySQLdb connecting python and mysql

1. Website
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

crtl+f find the mysql and python driver package to download

2. Put the downloaded driver package into the directory to be installed
Insert picture description here

3. Command line installation
Enter the command line to the target directory for installation:
pip install MySQL_python-1.2.5-cp38-none-win_amd64.whl
Insert picture description here
If an error is reported:
MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform

Modify the file name cp27 to the version corresponding to python

Guess you like

Origin blog.csdn.net/weixin_44421869/article/details/104395387