2

I know, there are many similar questions. I tried all solutions but non of them worked for me. I've been trying for hours and am now indescribably in a bad mood.

I want to install a few packages using pip (for example pip install mysql), but I always get (since 5 hours) this error:

_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
error: command 'C:\\Users\\myName\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

I do not understand whose idea it was to program such a stupid bug in Python, or that meaningless error. Sackoverflow is full of questions of this kind.

However, I installed Visual Studio 2015 and GCC (MinGW). Im using Python 2.7 which must be compatible to Visual C++ for Python 9.0. Nothing solved my problem. Downloading a precompiled file wouldn't solve the main issue. I'm hating python since ever but the last 5 hours put me on a new level of hating.

1 Answers1

1

Now, a few hours later a found the solution. I don't know why, but you can't install mysql, mysql-python or mysqldb, because something is wrong with the package. (see "Cannot open include file: 'config-win.h': No such file or directory" while installing mysql-python) I don't understand, how someone can publish a broken installer but however they did.

The solution that worked for me is, using

pip install mysql-connector-python

instead. Thats it. It took me about 6 hours to find that out. More about that: https://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html