I have mysql-python
v1.2.4 installed just fine on my machine (Windows 8). I am using Python 2.7. I always got this below error every time I try to upgrade to v1.2.5. (still happens as of v1.3.7)
C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\
9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'fi nal',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6. 0.2\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.wi n32-2.7\Release_mysql.obj /Zl _mysql.c _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory error: command 'C:\Users\User\AppData\Local\Programs\Common\Microsoft \Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
---------------------------------------- Rolling back uninstall of mysql-python Command "c:\python27\python.exe -u -c "import
setuptools, tokenize;file='c:\ \users\user\appdata\local\temp\pip-build-utz7of\MySQL-python\setup.py';ex ec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n' ), file, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-osy _cg-record\install-record.txt --single-version-externally-managed --compile" fai led with error code 1 in c:\users\user\appdata\local\temp\pip-build-utz7of\MySQL -python\
I've tried (and none work):
Failed building wheel for MySQL-python
)mysqlclient
Do I miss something? Thanks.
I solved it myself.
I use the wheel installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python.
There are two wheel packages there. The amd64
one refuses to install on my platform (Windows) but the other one works just fine. I mean the file with this name:
MySQL_python-1.2.5-cp27-none-win32.whl
Then install it by running this below command in the same folder with the wheel package.
pip install MySQL_python-1.2.5-cp27-none-win32.whl
Python 3.7
Use mysqlclient‑1.3.13‑cp37‑cp37m‑win32.whl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With