When trying to "pip install mysqlclient",it showed that 'OSError: mysql_config not found'

Environment: Ubuntu 18.04  Python Django

Screenshot as bellow:

When trying to

Solution:

    you need to install the relative dependencies.

$ sudo apt-get install libmysqld-dev

$ sudo apt-get install libmysqlclient-dev

    then you could install mysqlclient again.

 pip install mysqlclient

References:

https://stackoverflow.com/questions/47870628/oserror-mysql-config-not-found-when-trying-to-pip-install-mysqlclient-dja

你可能感兴趣的:(When trying to "pip install mysqlclient",it showed that 'OSError: mysql_config not found')