3
votes

I am trying to install mysqlclient, but I get this error message:

_mysql.c:40:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Could anyone help me to resolve this?

1
which system? you need python developement headers for the compilationTamar
on Ubuntu 16.04Vladyslav
So use apt-get to install mysql client, and python-dev if you needTamar

1 Answers

3
votes

You need to install the python development package (which contains the C headers files) for your OS (on debian-based distros it's named 'pythonX.X-dev' where 'X.X' is python version).