Trying to install install for MySQL-python - python

I am trying to install install for MySQL-python , but i have this error that require installing Microsoft Visual C++ 14.0 is required.
ERROR: Command errored out with exit status 1:
command: 'c:\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-iwizu2ag\\MySQL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-iwizu2ag\\MySQL-python\\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\pc\AppData\Local\Temp\pip-record-vnvrbcv_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python37\Include\MySQL-python'
cwd: C:\Users\pc\AppData\Local\Temp\pip-install-iwizu2ag\MySQL-python\
Complete output (24 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying _mysql_exceptions.py -> build\lib.win32-3.7
creating build\lib.win32-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
creating build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building '_mysql' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-iwizu2ag\\MySQL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-iwizu2ag\\MySQL-python\\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\pc\AppData\Local\Temp\pip-record-vnvrbcv_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python37\Include\MySQL-python' Check the logs for full command output.
Actually , I have Microsoft visual c++ 15 installed on my device

So after getting the same error message.
I did what the message said.
Downloaded and installed the build tools.
I couldn't find them on Micorsoft download page so here is a link
https://aka.ms/vs/16/release/vs_buildtools.exe
After installing is selected the options in the image and it worked

Related

i am getting error while installing mysqlclient on windows 10 no library is supproted

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\uaahacker\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\setup.py'"'"'; file='"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\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\uaahacker\AppData\Local\Temp\pip-record-62876lx5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\uaahacker\appdata\local\programs\python\python38-32\Include\mysqlclient'
cwd: C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457
Complete output (23 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\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
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\uaahacker\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\setup.py'"'"'; file='"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\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\uaahacker\AppData\Local\Temp\pip-record-62876lx5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\uaahacker\appdata\local\programs\python\python38-32\Include\mysqlclient' Check the logs for full command output.
There is no package on pypi for the 32-bit version of Python. Only for 64-bit Python.
And if you install mysqlclient from there, naturally, sources that need to be compiled will be installed.
And for 32-bit Python, the compiled package is available at https://www.lfd.uci.edu/~gohlke/pythonlibs/.
it is literally telling you how to solve the ptoblem in the error
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
just download visualstudio build tools

Unable to install python "Scalene" module

I'm trying to install Scalene module for profiling in Python.
I've tried two ways so far pip install scalene and pip install -U scalene but both gives me the following error:
Running setup.py install for scalene ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\deepanshu\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"'; __file__='"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\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\DEEPAN~1\AppData\Local\Temp\pip-record-hs0b9thb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deepanshu\appdata\local\programs\python\python37\Include\scalene'
cwd: C:\Users\DEEPAN~1\AppData\Local\Temp\pip-install-di4jsn85\scalene\
Complete output (40 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\scalene
copying scalene\adaptive.py -> build\lib.win-amd64-3.7\scalene
copying scalene\leak_analysis.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_exit.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_fork.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_lock.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_pjoin.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_poll_selector.py -> build\lib.win-amd64-3.7\scalene
copying scalene\replacement_thread_join.py -> build\lib.win-amd64-3.7\scalene
copying scalene\runningstats.py -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene_arguments.py -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene_magics.py -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene_output.py -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene_profiler.py -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene_statistics.py -> build\lib.win-amd64-3.7\scalene
copying scalene\sparkline.py -> build\lib.win-amd64-3.7\scalene
copying scalene\syntaxline.py -> build\lib.win-amd64-3.7\scalene
copying scalene\__init__.py -> build\lib.win-amd64-3.7\scalene
copying scalene\__main__.py -> build\lib.win-amd64-3.7\scalene
running egg_info
writing scalene.egg-info\PKG-INFO
writing dependency_links to scalene.egg-info\dependency_links.txt
writing entry points to scalene.egg-info\entry_points.txt
writing requirements to scalene.egg-info\requires.txt
writing top-level names to scalene.egg-info\top_level.txt
reading manifest file 'scalene.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'scalene.egg-info\SOURCES.txt'
copying scalene\libscalene.dylib -> build\lib.win-amd64-3.7\scalene
copying scalene\libscalene.so -> build\lib.win-amd64-3.7\scalene
copying scalene\scalene-usage.txt -> build\lib.win-amd64-3.7\scalene
running build_ext
building 'get_line_atomic' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\deepanshu\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\setup.py'"'"'; __file__='"'"'C:\\Users\\DEEPAN~1\\AppData\\Local\\Temp\\pip-install-di4jsn85\\scalene\\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\DEEPAN~1\AppData\Local\Temp\pip-record-hs0b9thb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deepanshu\appdata\local\programs\python\python37\Include\scalene' Check the logs for full command output.
Please suggest a way to resolve this error.
I'm using python 3.7 on windows 10.
Try installing an older version:
e.g. pip install scalene==0.9.16
Though I'm not sure whether it supports Windows 10 or not

'Command errored out with exit status 1' getting this error message while installing mysql client in python

(env) C:\Users\shreya kumar\Documents\django website\audit_website>pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.0.1.tar.gz (87 kB)
Using legacy 'setup.py install' for mysqlclient, since package 'wheel' is not installed.
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\shreya kumar\documents\django website\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\shreya kumar\\AppData\\Local\\Temp\\pip-install-7l4hf6a3\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\shreya kumar\\AppData\\Local\\Temp\\pip-install-7l4hf6a3\\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\shreya kumar\AppData\Local\Temp\pip-record-npl_lx21\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\shreya kumar\documents\django website\env\include\site\python3.9\mysqlclient'
cwd: C:\Users\shreya kumar\AppData\Local\Temp\pip-install-7l4hf6a3\mysqlclient\
Complete output (23 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.9\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.9\MySQLdb
creating build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.9\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.9\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\shreya kumar\documents\django website\env\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\shreya kumar\\AppData\\Local\\Temp\\pip-install-7l4hf6a3\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\shreya kumar\\AppData\\Local\\Temp\\pip-install-7l4hf6a3\\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\shreya kumar\AppData\Local\Temp\pip-record-npl_lx21\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\shreya kumar\documents\django website\env\include\site\python3.9\mysqlclient' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the 'c:\users\shreya kumar\documents\django website\env\scripts\python.exe -m pip install --upgrade pip' command.
(env) C:\Users\shreya kumar\Documents\django website\audit_website>

Getting "ERROR: Command errored out with exit status 1:" when trying to install mysql

I get this error when I try to install mysql package for python:
C:\Windows\system32>pip install mysql
Collecting mysql
Using cached https://files.pythonhosted.org/packages/bf/5f/b574ac9f70811df0540e403309f349a8b9fa1a25d3653824c32e52cc1f28/mysql-0.0.2.tar.gz
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
Installing collected packages: mysqlclient, mysql
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Uros\\AppData\\Local\\Temp\\pip-install-67_bzzjm\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Uros\\AppData\\Local\\Temp\\pip-install-67_bzzjm\\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\Uros\AppData\Local\Temp\pip-record-wbot1jpz\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Uros\AppData\Local\Temp\pip-install-67_bzzjm\mysqlclient\
Complete output (24 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
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Uros\\AppData\\Local\\Temp\\pip-install-67_bzzjm\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Uros\\AppData\\Local\\Temp\\pip-install-67_bzzjm\\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\Uros\AppData\Local\Temp\pip-record-wbot1jpz\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I had the same problem. Instead of installing mysql I installed a MySQL connector to connect to MySQL database:
pip install mysql-connector-python
This is how the Python script looks like to connects to MySQL:
import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="yourusername",
passwd="yourpassword"
)

VSCode, why do i get error while trying to install mysqlclient to django project

I'm trying to get my mysql integration to django project however when i try to pip install mysqlclient
VSCode throws this error:
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: 'c:\users\popcorn\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\popcorn\\AppData\\Local\\Temp\\pip-install-yefz5w6i\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\popcorn\\AppData\\Local\\Temp\\pip-install-yefz5w6i\\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\popcorn\AppData\Local\Temp\pip-record-f55ih7zv\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\popcorn\AppData\Local\Temp\pip-install-yefz5w6i\mysqlclient\
Complete output (30 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
creating build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\MySQLdb
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,4,4,'final',0) -D__version__=1.4.4 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\mariadb" -Ic:\users\popcorn\appdata\local\programs\python\python37-32\include -Ic:\users\popcorn\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\include" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.7\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\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\popcorn\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\popcorn\\AppData\\Local\\Temp\\pip-install-yefz5w6i\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\popcorn\\AppData\\Local\\Temp\\pip-install-yefz5w6i\\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\popcorn\AppData\Local\Temp\pip-record-f55ih7zv\install-record.txt' --single-version-externally-managed --compile Check the
logs for full command output.
Anyone know how can i fix this? I've already installed Microsoft Visual C++ pack version 14.22.
The latest release of mysqlclient has wheels for Windows, but they are for 64-bit. If you're on a 64-bit install of Windows I would solve this by installing a 64-bit build of Python. Otherwise it seems to be a bug in the sdist where a header file was accidentally left out.

Categories

Resources