安裝mysqlclient報錯:
ERROR: Command errored out with exit status 1: 'd:\cs\csruanjiananzhuang\python\python.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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\at2893\AppData\Local\Temp\pip-record-ow_v2_4a\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\cs\csruanjiananzhuang\python\Include\mysqlclient' 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