How to Solve Error in installing MySQL Python in Pip

Error 1: EnvironmentError: mysql_config not found

Solution: yum install mysql-devel

Error 2: Python.h No such file or directory

For more errors see the following lines.

_mysql.c:29:20: fatal error: Python.h: No such file or directory
#include “Python.h”
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1

Solution: yum install python-devel.x86_64

In fact, these two errors are one and the same, both are not installed python-devel, only error 2 is 64-bit

 

Similar Posts: