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

后端 未结 21 2552
广开言路
广开言路 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:18

    I had the same problem in the Terraform:light container. It is based on Alpine.

    There you have to install mariadb-dev with:

    apk add mariadb-dev
    

    But that one is not enough because also all the other dependencies are missed:

    apk add python2 py2-pip gcc python2-dev musl-dev
    

提交回复
热议问题