0
(my_project) [yw@yanbox my_project]$ pip install mysqlclient

File "/tmp/pip-build-zza957yo/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-build-zza957yo/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found

Any ideas how to fix this problem?

Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378
stewchicken
  • 463
  • 1
  • 8
  • 20
  • Possible duplicate of [pip install mysql-python fails with EnvironmentError: mysql\_config not found](https://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found) – phd Dec 17 '17 at 17:56

1 Answers1

0

Make sure mysql_config is installed in your system (e.g. run locate mysql_config). It's usually provided by the libmysqlclient package or similar, depending on your distribution.

If it's present, try providing the path to it to pip, e.g.:

PATH=/usr/local/mysql/bin:$PATH pip install mysqlclient
Eugene Yarmash
  • 142,882
  • 41
  • 325
  • 378