pip install mysql-python fails with EnvironmentError: mysql_config not found

后端 未结 21 2532
广开言路
广开言路 2020-11-22 15:58

This is the error I get

(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install mysql-python
Downloading/unpacking mysql-python
  Do         


        
21条回答
  •  长情又很酷
    2020-11-22 16:03

    I was trying to install mysql-python on an Amazon EC2 Linux instance and I had to install these :

    yum install mysql mysql-devel mysql-common mysql-libs gcc
    

    But then I got this error :

    _mysql.c:29:20: fatal error: Python.h: No such file or directory
    

    So I installed :

    yum install python-devel
    

    And that did the trick.

提交回复
热议问题