-2

this the massage i get pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-1.4.6.tar.gz (85 kB) Building wheels for collected packages: mysqlclient Building wheel for mysqlclient (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\thewoods\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TheWoods\\AppData\\Local\\Temp\\pip-install-do75yjl_\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\TheWoods\\AppData\\Local\\Temp\\pip-install-do75yjl_\\mysqlclient\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\TheWoods\AppData\Local\Temp\pip-wheel-3e8m_6rp' cwd: C:\Users\TheWoods\AppData\Local\Temp\pip-install-do75yjl_\mysqlclient\ Complete output (30 lines): running bdist_wheel running build running build_py creating build creating build\lib.win32-3.8 creating build\lib.win32-3.8\MySQLdb copying MySQLdb\__init__.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\_exceptions.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\compat.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb creating build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants running build_ext building 'MySQLdb._mysql' extension creating build\temp.win32-3.8 creating build\temp.win32-3.8\Release creating build\temp.win32-3.8\Release\MySQLdb C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\mariadb" -Ic:\users\thewoods\appdata\local\programs\python\python38-32\include -Ic:\users\thewoods\appdata\local\programs\python\python38-32\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" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.8\Release\MySQLdb/_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 14.0\\VC\\BIN\\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Failed building wheel for mysqlclient Running setup.py clean for mysqlclient Failed to build mysqlclient Installing collected packages: mysqlclient Running setup.py install for mysqlclient ... error ERROR: Command errored out with exit status 1: command: 'c:\users\thewoods\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TheWoods\\AppData\\Local\\Temp\\pip-install-do75yjl_\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\TheWoods\\AppData\\Local\\Temp\\pip-install-do75yjl_\\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\TheWoods\AppData\Local\Temp\pip-record-hyswpe_s\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\thewoods\appdata\local\programs\python\python38-32\Include\mysqlclient' cwd: C:\Users\TheWoods\AppData\Local\Temp\pip-install-do75yjl_\mysqlclient\ Complete output (30 lines): running install running build running build_py creating build creating build\lib.win32-3.8 creating build\lib.win32-3.8\MySQLdb copying MySQLdb\__init__.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\_exceptions.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\compat.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb creating build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants running build_ext building 'MySQLdb._mysql' extension creating build\temp.win32-3.8 creating build\temp.win32-3.8\Release creating build\temp.win32-3.8\Release\MySQLdb C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\mariadb" -Ic:\users\thewoods\appdata\local\programs\python\python38-32\include -Ic:\users\thewoods\appdata\local\programs\python\python38-32\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" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.8\Release\MySQLdb/_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 14.0\\VC\\BIN\\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\thewoods\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\TheWoods\AppData\Local\Temp\pip-install-do75yjl_\mysqlclient\setup.py'"'"'; file='"'"'C:\Users\TheWoods\AppData\Local\Temp\pip-install-do75yjl_\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\TheWoods\AppData\Local\Temp\pip-record-hyswpe_s\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\thewoods\appdata\local\programs\python\python38-32\Include\mysqlclient' Check the logs for full command output.

jasana
  • 1
  • 1
  • Does this answer your question? [pip install mysqlclient returns "fatal error C1083: Cannot open file: 'mysql.h': No such file or directory](https://stackoverflow.com/questions/51294268/pip-install-mysqlclient-returns-fatal-error-c1083-cannot-open-file-mysql-h) – hoefling Jun 08 '20 at 20:13

3 Answers3

0

i think i solved it ,but im not sure why that worked , i have windows 10 x64 so i downloaded the 64 version file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient but it didnt work after that i downloaded the 32 version and it worked and i checked after that i ran "pip insatll mysqlclient" i got Requirement already satisfied: mysqlclient programs\python\python38-32\lib\site-packages (1.4.6)

jasana
  • 1
  • 1
0

I believe, I also have one solution for this problem. I am using Python 3.8.3. Following is the information <<Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32>>

Do the following

Goto - [https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient][1]

Download - mysqlclient-1.4.6-cp38-cp38-win32.whl - as per the Python version I am using.

Ensure that the pip version is 20.0.1. Use python -m pip install -U pip==20.0.1

Run the command pip install mysqlclient-1.4.6-cp38-cp38-win32.whl

This worked for me.

Following were the versions of modules installed on my machine when the command pip install mysqlclient-1.4.6-cp38-cp38-win32.whl did not work on my machine.

Package Version


asgiref==>3.2.7

Django==>3.0.7

pip==>20.1.1

pytz==>2020.1

setuptools==>47.1.1

sqlparse==>0.3.1

wheel==>0.34.2

Hope this will help

-1

I think the error occurred because Visual C++ 14.0 does not exist. Please refer to the link below.

Pip error: Microsoft Visual C++ 14.0 is required