1. 程式人生 > >安裝mysqlclient

安裝mysqlclient

 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,13,'final',0) -D__version__=1.3.13 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -IC:\Users\leslie\AppData\Local\Programs\Python\Python36\include -IC:\Users\leslie\AppData\Local\Programs\Python\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.6\Release\_mysql.obj /Zl     _mysql.c     _mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory     error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

pip install mysqlclient時候報錯:

這時候需要進入到python工程下的虛擬環境中去workon environ_1

(environ_1) C:\Users\leslie>cd C:\Users\leslie\Downloads

(environ_1) C:\Users\leslie\Downloads>pip install mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl Processing c:\users\leslie\downloads\mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl Installing collected packages: mysqlclient Successfully installed mysqlclient-1.3.13