To solve pip install mysql-python fails with EnvironmentError: mysql_config not foundv error follow below methods.
raise EnvironmentError("%s not found" % (mysql_config.path,)) EnvironmentError: mysql_config not found Complete output from command python setup.py egg_info: sh: mysql_config: not found
How to solve pip install mysql-python fails with EnvironmentError: mysql_config not foundv ?
Refer the given methods to solve the issue.
Mysql config appears to be missing from your system, or the installer was unable to locate it. Check that mysql config is truly installed.
On Debian/Ubuntu, for example, you must install the package:
sudo apt-get install libmysqlclient-dev
Perhaps mysql config is not in your path; this will be the case if you compile the mysql suite yourself.
It is now available for latest versions of Debian/Ubuntu (as of 2018).
sudo apt install default-libmysqlclient-dev
Method 2 :
In Mac OS, I simply ran this in terminal to fix:
This is the quickest solution I found – it adds it to the path, but I think you’d be better off adding it permanently (ie, to /etc/paths) if you plan to install MySQL-python in a different context.
Hope the above solution works.
Also read :