python3.7 mysqlclient install过程中遇到的问题
报错记录
MySQLdb/_mysql.c(29): fatal error C1083: 无法打开包括文件: “mysql.h”: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
[end of output]
$ pip install mysqlclient‑1.4.6‑cp37‑cp37m‑win_amd64.whl
WARNING: Requirement 'mysqlclient‑1.4.6‑cp37‑cp37m‑win_amd64.whl' looks like a filename, but
the file does not exist
ERROR: mysqlclient‑1.4.6‑cp37‑cp37m‑win_amd64.whl is not a valid wheel filename.
(venv)
$ pip install --only-binary :all: mysqlclient
Collecting mysqlclient
Downloading mysqlclient-2.1.0-cp37-cp37m-win_amd64.whl (179 kB)
---------------------------------------- 180.0/180.0 kB 8.4 kB/s eta 0:00:00
Installing collected packages: mysqlclient
Successfully installed mysqlclient-2.1.0