pip 安裝 mysqlclient 報錯 Command errored out with exit status 1

安裝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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章