Not working with python 3.5
This is the error I get when I try installing mysqlclient. I am using Windows and python 3.5.
Installing 'mysqlclient'
Collecting mysqlclient
Using cached mysqlclient-1.3.6.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient
Complete output from command "c:\users\buccaneer\documents\visual studio 2013\Projects\del1\del1\envrm\Scripts\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\BUCCAN~1\\AppData\\Local\\Temp\\pip-build-wuhkxhu3\\mysqlclient\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BUCCAN~1\AppData\Local\Temp\pip-3jbluuk2-record\install-record.txt --single-version-externally-managed --compile --install-headers "c:\users\buccaneer\documents\visual studio 2013\Projects\del1\del1\envrm\include\site\python3.5\mysqlclient":
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
copying _mysql_exceptions.py -> build\lib.win32-3.5
creating build\lib.win32-3.5\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.5\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.5\MySQLdb
creating build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.5\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.5\MySQLdb\constants
running build_ext
building '_mysql' extension
error: Unable to find vcvarsall.bat
@methane . I tried your binary wheel but it did't work. ERROR: mysqlclient-1.3.7-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
@ningquec Do you use CPython 3.5 Win64?
Yes, i install it in virtual env. but it worked while not venv.
pip install -U pip setuptools wheel before pip install mysqlclient-1.3.7-cp35-cp35m-win_amd64.whl?
i did it this way.Downloaded the mysqlclient.ie mysqlclient-1.3.4-cp34-none-win_amd64.whl saved it in my downloads. Open your work folder and activate your virtualenv. then run this commad. pip install C:/users/your/user/to/where/mysqlclient/is and thats it. If using django then config your cridentials in settings file.Happy wheeling
I've managed to build binary wheel for Python 3.5 and 2.7
https://github.com/PyMySQL/mysqlclient-python/releases/tag/1.3.8
Anyone try these wheel?
@jameskandau your suggestion worked for me. I installed mysqlclient-1.3.7-cp35-none-win_amd64.whl and stopped getting the error. I'm using Win10, Python 3.5, Django 1.9.6. So far so good. Thanks!
Great if it worked for you. Happy coding On 11 Oct 2016 05:00, "oliverqg" [email protected] wrote:
@jameskandau https://github.com/jameskandau your suggestion worked for me. I installed mysqlclient-1.3.7-cp35-none-win_amd64.whl and stopped getting the error. I'm using Win10, Python 3.5, Django 1.9.6. So far so good. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyMySQL/mysqlclient-python/issues/54#issuecomment-252791816, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNdoCPUxG-3Y-2PZoa6EHpPx1y0klxRks5qyu3BgaJpZM4GD0mM .
Thank you so much @cgohlke you saved me. I've spent an embarrassing amount of hours today getting this working.
I've managed to build binary wheel for Python 3.5 and 2.7 https://github.com/PyMySQL/mysqlclient-python/releases/tag/1.3.8 Anyone try these wheel?
On Windows 10, Python 3.5.2 64-Bit crashes with that binary when trying to run Django's manage.py runserver (1.10.3). Probably noteworthy that I am running MariaDB.
Faulting application name: python.exe, Version: 3.5.1150.1013, time stamp: 0x576f0390 Faulting module name: python35.dll, Version: 3.5.1150.1013, time stamp: 0x576f037c Exception code: 0xc0000005 Fault offset: 0x00000000000e631c
Edit: No issues with mysqlclient-1.3.7-cp35-cp35m-win_amd64.whl
Thanks.
I gave up about building mysqlclient.lib by myself. I'll wait until Oracle releases new MySQL Connector/C.
Hello @methane , I build mysqlclient.lib under VS2015 and use this file to build mysqlclient-python 1.3.9 successfully. I aslo put my steps in the wiki part: https://github.com/PyMySQL/mysqlclient-python/wiki/Building-mysqlclient.lib-on-Windows-with-VS2015
May I ask are these steps wrong? Are there big hidden bugs? Why do you give up building mysqlclient.lib by yourself? Thank you.
May I ask are these steps wrong?
I cannot. I don't know right step.
Are there big hidden bugs?
I don't know. I don't use Windows. I can't find hidden bugs by myself.
Why do you give up building mysqlclient.lib by yourself?
Since I don't use Windows. I'm not Windows expert. I have a lot of other things to use my time.
Please ask to Oracle, not me.
I was having the same issue and it was resolved after I updated pip to latest version (pip 9.0.1) and then it worked with the wheel file available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
Thank you very much @emepe. I'm using python 3.5.2 and just downloaded and installed mysqlclient without problems
[image: Inline image 1] http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
mysqlclient‑1.3.9‑cp35‑cp35m‑win32.whl because I had installed the 32bits version of python 3.5... Now I moved to 3.6 but django runserver breaks 7 out of 10 times I run it :-(
On Fri, Feb 10, 2017 at 5:02 PM, Ed [email protected] wrote:
@clustersnake https://github.com/clustersnake I use the same version of python please, tell me what wheel did you install?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyMySQL/mysqlclient-python/issues/54#issuecomment-279064922, or mute the thread https://github.com/notifications/unsubscribe-auth/APpabWz1-tPCP8l476Dc3JjnscXgk83Fks5rbNBmgaJpZM4GD0mM .
well this worked for me:
pip install mysqlclient
this is for python 3.x in windows 7 x64
I am using pycharm virtual env and experiencing this problem.
After I upgrade my pip to 9.0.1 and then pip install mysqlclient, everything works fine. Thanks @kinsleykajiva
For me, not even installing the latest version MySQL Installer 8.0.13 did work.
I'm getting:
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz
Building wheels for collected packages: mysqlclient
Running setup.py bdist_wheel for mysqlclient: started
Running setup.py bdist_wheel for mysqlclient: finished with status 'error'
Complete output from command "c:\program files (x86)\python\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\tim\\AppData\\Local\\Temp\\pip-install-7ub252fz\\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\tim\AppData\Local\Temp\pip-wheel-rc2q0_1s --python-tag cp37:
running bdist_wheel
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\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
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\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:\program files (x86)\python\include" "-Ic:\program files (x86)\python\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "mysql.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Found existing installation: mysqlclient 1.3.12
Uninstalling mysqlclient-1.3.12:
Successfully uninstalled mysqlclient-1.3.12
Running setup.py install for mysqlclient: started
Running setup.py install for mysqlclient: finished with status 'error'
Complete output from command "c:\program files (x86)\python\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\tim\\AppData\\Local\\Temp\\pip-install-7ub252fz\\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\tim\AppData\Local\Temp\pip-record-nibnj0lm\install-record.txt --single-version-externally-managed --compile:
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\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
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\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:\program files (x86)\python\include" "-Ic:\program files (x86)\python\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "mysql.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Rolling back uninstall of mysqlclient
My pip version is pip 18.1 from c:\program files (x86)\python\lib\site-packages\pip (python 3.7)