报错如下:
ERROR: Could not find a version that satisfies the requirement MySQLdb (from versions: none)
ERROR: No matching distribution found for MySQLdb
解决方法(不同系统版本使用相应的下载安装命令,但安装包
python3-mysqldb
名是一样):
apt-get install python3-mysqldb (Linux Ubuntu)
root@iZwz9f60gpe468b3xvyyllZ:~# apt-get install python3-mysqldb
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
default-mysql-server | virtual-mysql-server python3-mysqldb-dbg
The following NEW packages will be installed:
python3-mysqldb
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 44.9 kB of archives.
After this operation, 181 kB of additional disk space will be used.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu focal/main amd64 python3-mysqldb amd64 1.4.4-2build1 [44.9 kB]
Fetched 44.9 kB in 0s (370 kB/s)
Selecting previously unselected package python3-mysqldb.
(Reading database … 145352 files and directories currently installed.)
Preparing to unpack …/python3-mysqldb_1.4.4-2build1_amd64.deb …
Unpacking python3-mysqldb (1.4.4-2build1) …
Setting up python3-mysqldb (1.4.4-2build1) …