安装mysqlclient报错:
ERROR: Command errored out with exit status 1: 'd:cscsruanjiananzhuangpythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\at2893\AppData\Local\Temp\pip-install-mevniq0a\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\at2893\AppData\Local\Temp\pip-install-mevniq0a\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Usersat2893AppDataLocalTemppip-record-ow_v2_4ainstall-record.txt' --single-version-externally-managed --compile --install-headers 'd:cscsruanjiananzhuangpythonIncludemysqlclient' Check the logs for full command output.
解决方法:
1、命令行查看python版本。
2、网址: https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
下载:mysqlclient-1.4.6-cp37-cp37m-win32.whl
cp37:python3.7 win32 ---32位
3、下载之后放在文件夹下面, 在该目录下,启动命令行,输入命令:pip install mysqlclient-1.4.6-cp37-cp37m-win32.whl 即可下载安装mysqlclient成功。
ysqlclient-1.4.6-cp37-cp37m-win32.whl