Erreur de téléchargement de mysqlclient sous Windows
Après avoir tapé ce code dans le terminal pip install mysqlclient
je reçois ce message d'erreur :
ERROR: Command errored out with exit status 1:
command: 'f:pycharmpythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-hjic4wc3install-record.txt' --single-version-externally-managed --compile
cwd: C:UsersADMINI~1AppDataLocalTemppip-install-8c6ksaj2mysqlclient
Complete output (30 lines):
running install
running build
running build_py
creating build
creating buildlib.win32-3.7
creating buildlib.win32-3.7MySQLdb
copying MySQLdb__init__.py -> buildlib.win32-3.7MySQLdb
copying MySQLdb_exceptions.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbcompat.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbconnections.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbconverters.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbcursors.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbrelease.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbtimes.py -> buildlib.win32-3.7MySQLdb
creating buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstants__init__.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsCR.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsER.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.7MySQLdbconstants
running build_ext
building 'MySQLdb._mysql' extension
creating buildtemp.win32-3.7
creating buildtemp.win32-3.7Release
creating buildtemp.win32-3.7ReleaseMySQLdb
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508binHostX86x86cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 "-IC:Program Files (x86)MySQLMySQL Connector C 6.1includemariadb" -If:pycharmpythoninclude -If:pycharmpythoninclude "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508ATLMFCinclude"
"-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508include" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /TcMySQLdb/_mysql.c /Fobuildtemp.win32-3.7ReleaseMySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
_mysql.c
MySQLdb/_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\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x86\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'f:pycharmpythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-hjic4wc3install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Et c'est toute la fenêtre du terminal
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'f:pycharmpythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-hjic4wc3install-record.txt' --single-version-externally-managed --compile
cwd: C:UsersADMINI~1AppDataLocalTemppip-install-8c6ksaj2mysqlclient
Complete output (30 lines):
running install
running build
running build_py
creating build
creating buildlib.win32-3.7
creating buildlib.win32-3.7MySQLdb
copying MySQLdb__init__.py -> buildlib.win32-3.7MySQLdb
copying MySQLdb_exceptions.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbcompat.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbconnections.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbconverters.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbcursors.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbrelease.py -> buildlib.win32-3.7MySQLdb
copying MySQLdbtimes.py -> buildlib.win32-3.7MySQLdb
creating buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstants__init__.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsCR.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsER.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.7MySQLdbconstants
copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.7MySQLdbconstants
running build_ext
building 'MySQLdb._mysql' extension
creating buildtemp.win32-3.7
creating buildtemp.win32-3.7Release
creating buildtemp.win32-3.7ReleaseMySQLdb
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508binHostX86x86cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 "-IC:Program Files (x86)MySQLMySQL Connector C 6.1includemariadb" -If:pycharmpythoninclude -If:pycharmpythoninclude "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508ATLMFCinclude"
"-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.20.27508include" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0ucrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0shared" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0um" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0winrt" "-IC:Program Files (x86)Windows Kits10include10.0.17763.0cppwinrt" /TcMySQLdb/_mysql.c /Fobuildtemp.win32-3.7ReleaseMySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
_mysql.c
MySQLdb/_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\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x86\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'f:pycharmpythonpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8c6ksaj2\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~1AppDataLocalTemppip-record-hjic4wc3install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Je suis nouveau donc je ne sais pas ce qui se passe : (.J'espère que vous le saurez.