Closed piyushspss closed 8 years ago
The reported problem with vcvarsall.bat missing goes away if you install Visual Studio 14.0 with Python Tools for Visual Studio, which is an option under Programming Languages selection.
However, thereafter another problem pops up reelated to missing 'my_config.h':
building '_mysql' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,6,'final',1) -D__version__=1.3.6 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" "-Ic:\apps\python 3.5\include" "-Ic:\apps\python 3.5\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\WindowsKits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" /Tc_mysql.c /Fobuild\temp.win32-3.5\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29): fatal error C1083: Cannot open include file: 'my_config.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
Building MySQL-python on Windows is hard. You should build from source instead of pip install since you need to edit setup.cfg file.
To make pip installable, I built binary wheels for Windows. But I haven't built wheel for Python 3.5 yet. I hope I can build it in near future.
Adding to my own post: my_config.h becomes available after installing MySQL with development option. But even then the building process fails because it looks for the file from C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include although it becomes installed into C:\Program Files\MySQL\MySQL Connector.C 6.1\include.
Perhaps I'll wait until mysqlclient‑1.3.6‑cp35‑none‑win32.whl becomes available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient...
MySQL Connector/C doesn't support VS 2015 yet.
Hi guys, same problem here. Has anyone found out if uninstalling Python tools from VS2015 makes the problem disappear? Or do we just have to wait for the 3.5 package?
For me Python in VS is nice-to-have but not have-to-have.
I can't build extension module for Python 3.5 for now. I hope new MySQL Connector/C supports VS 2015...
Anyone figured this out yet? I'm using Windows 10, VS 2015, Python 3.5 64bit.
ref: http://bugs.mysql.com/bug.php?id=78282
This bug should be fixed for building Python's mysqlclient on Python 3.5
methane, can you explain how? I'm still having difficulty. I'm not using pip rather compiling the project using python setup.py install
after modifying site.cfg
to point to the correct location of MySQL Connector.
Python 3.5 uses VS2015. But current MySQL can't compile under VS2015. So I can't build mysqlclient-python for Python 3.5 without VCRT mismatch.
Since I'm not Windows expert, I can't build dual-VCRT library. And I don't want to support it if I can build it.
Confirming error with VS2015 while trying to install via PyCharm:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2
It doesn't work for python3.5 on ubuntu 15.04 too. Hand to edit /usr/bin/pip3 so that !#/usr/bin/python3.5 was now !#/usr/bin/python3 before it was able to install
Up ! Nobody gots answer???
This is a issue of MySQL. I can't do anything until they make a new release.
You can just link against the version shipped with mysql, I did it for py3.5/win64, linked against mysqlclient from mysql 5.7.10 http://pyside.markus-ullmann.de/mysqlclient-win/mysqlclient-1.3.7-cp35-none-win_amd64.whl
Thanks @jokey2k . It works for me. Your suggestion saved me much of lost time. I am using Windows 7 and Python 3.5 installed via Anaconda.
@jokey2k: strangely enough pip install
Thanks @jokey2k! That was just what I have been looking for!
You're welcome :-)
Thanks @jokey2k ! is it also possible to have mysqlclient-1.3.7-cp35-none-win32.whl ?
Thanks @jokey2k it works for me.
I put 32 and 64-bit wheels for Python 3.5 at http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient. These are linked to the multi-threaded DLL runtime (/MD) versions of mysqlclient 5.7.11 for VC14.
Thank You @cgohlke so much!!!
FYI:
MySQL 5.6.29 was released Changes in MySQL 5.6.29 (2016-02-05)
and from above, it seem to have been resolved VS2015 problem.
I'm waiting new release of MySQL Connector/C
thank you so much !!!
Works a charm via pip install. Wondering if anyone knows a way to install the wheel in a virtualenv in PyCharm? Otherwise no worries, I'll just make it available to the whole of 3.5.
Thanks @jokey2k. It works for me. I am using Windows 7 64bit and Python 3.5 installed via Anaconda.
Can someone please explain how to implement @jokey2k 's solution step by step? Thanks.
@ryanhalabi
I know it, but I don't want to do it... Why MySQL developer don't release MySQL Connector/C for such a long time? It's very annoying.
Thanks @jokey2k the solution worked for me. windows 10, 64 bit system and python 3.5
thanks @cgohlke ; +100 internets to you :+1:
thank you @cgohlke for linking to the 32-bit .whl :D
If you get the error with vcvarsall.bat you could also try to set these environment variables: set DISTUTILS_USE_SDK=1 set MSSdk=1 set PY_VCRUNTIME_REDIST="No Thanks" this works for msvc2013
for later msvc you must set PY_VCRUNTIME_REDIST to a correct path.
This is general the case if you compile modules.
the missing include is fixed after extracting mysql with include directory and setting the INCLUDE environment variable for cl correctly. (also linker variable for sure)
I got it only worky by setting the code page to normal windows code page ("chcp 1252"). Normally i must set it to 65001 cause some modules require this to work.
@kreuzberger Do you mean use msvc2013 (VC13) to build Python 3.5 (based on VC14 runtime) extension module? Is it really safe?
no, sorry for the misunderstanding. I compile python myself with vs2013 too. Mixing is no good idea. but its python 3.5 as asked in the questions.
Hmmm. Why Oracle doesn't release MySQL Connector/C for VC14 for such a long time.... Very annoying...
Hi @jokey2k. I am new to django, can you please create the instruction on how to use the whl file you have provided? thanks!
I've managed to build by myself and uploaded binary wheel for CPython 3.5 amd64. (Building all on Windows from source was not a fun task...)
Can anyone try this?
I succeeded to build MySQL clientlib in MySQL 5.7.15 in this weekend. I'll release next bugfix version with Python 3.5 Win64 binary wheel.
@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" notifications@github.com 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-winamd64.whl
This is the error I get when I try installing mysqlclient. I am using Windows and python 3.5.