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

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

    For anyone that is using MariaDB instead of MySQL, the solution is to install the libmariadbclient-dev package and create a symbolic link to the config file with the correct name.

    For example this worked for me:

    ln -s /usr/bin/mariadb_config /usr/bin/mysql_config
    

提交回复
热议问题