Mail archive

[alpine-devel] pip install mysql-python without installing complete mariadb package

From: Toni Pizà <>
Date: Mon, 6 Jun 2016 08:32:03 +0200


mysql-python relies on mysql_config for its installation. Trying to pip
install it without the complete mariadb package (where mysql_config is
results on an error:

/app # pip install mysql-python
Collecting mysql-python
   Downloading (108kB)
     100% |████████████████████████████████| 110kB 729kB/s
     Complete output from command python egg_info:
     sh: mysql_config: not found
     Traceback (most recent call last):
       File "<string>", line 20, in <module>
       File "/tmp/pip-build-GEIJC6/mysql-python/", line 17, in
         metadata, options = get_config()
       File "", line 43, in get_config
         libs = mysql_config("libs_r")
       File "", line 25, in mysql_config
         raise EnvironmentError("%s not found" % (mysql_config.path,))
     EnvironmentError: mysql_config not found

Command "python egg_info" failed with error code 1 in

After installing mariadb-dev package (with mariadb as a dependency) it
can find mysql_config and succesfully install mysql-python.

On other distros (debian based) its enought to install
libmysqlclient-dev. The same "problem" occurs with psycopg2 and postgres.

I suggest to rethink the mariadb related package to allow the
installation of python modules without the need to install the entire
database server. Thanks a lot!

Received on Mon Jun 06 2016 - 08:32:03 UTC