0

The python command is pip install mysql-python

The full error is _mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

Can someone please tell me how to fix this error?

What exactly is mysql-python and how is it different from regular mysql?

Another stack overflow post suggested installing it with a setup executable, where can I find this?

I installed something called mysql python connector from here: https://downloads.mysql.com/archives/c-c/ It installed into C:\Program Files\MySQL\MySQL Connector C 6.1

However, I cannot find mysqld executable anywhere in this folder

Does this install mysql or do I actually need to install it from the Oracle website?

Mich
  • 3,188
  • 4
  • 37
  • 85
  • 1
    Does this answer your question? [mysql-python install error: Cannot open include file 'config-win.h'](https://stackoverflow.com/questions/26866147/mysql-python-install-error-cannot-open-include-file-config-win-h) – Rohan Sawant Mar 18 '20 at 00:28
  • No, unfortunately, because all the answers just tell to install `mysqlclient` and I tried doing this, but its not the same thing as mysql-python. I cannot find this `mysqld` executable anywhere – Mich Mar 18 '20 at 00:30
  • 1
    Mysqlclient is a fork of mysql-python, which supports python3, while the original version does not. This is why installing mysqlclient is the accepted answer there. Mysqld is the mysql server executable. – Shadow Mar 18 '20 at 00:37
  • Ok, but how do I actually start mysql? Do I need to download the 400 mb installer from Oracle website? – Mich Mar 18 '20 at 00:39
  • You are mixing lots of questions here. First, you are asking how to install a python connector for mysql, now you are asking a completely different question. Pls make up your mind what you would like to know and stick to that. – Shadow Mar 18 '20 at 00:41
  • you can install the MySQL connector with `pip install mysql-connector-python` and the python MySQL client using `pip install PyMySQL` – blau Mar 18 '20 at 00:41
  • my question, as its stated above, Do I need to download the 400 mb mysql installer from Oracle website in order to use mysqlclient? – Mich Mar 18 '20 at 00:46

2 Answers2

0

This required the full MySql server installation from Oracle

Mich
  • 3,188
  • 4
  • 37
  • 85
0

mysql-python is a module built for python-2 for interfacing with the mysql server so this does not include the mysql server and there is a fork of the same module called mysqlclient for python-3.

The reason for your error is you haven't installed Visual Studio 2019 to compile the c/c++ code in the python package. If you don't want to install Visual Studio 2019 check out these Python Wheel (.whl) files according to your python version

https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python (Python 2) https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient (Python 3)