Mail archive
alpine-devel

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

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

HI!

mysql-python relies on mysql_config for its installation. Trying to pip
install it without the complete mariadb package (where mysql_config is
found
https://pkgs.alpinelinux.org/contents?file=mysql_config&path=&name=&branch=edge&repo=main&arch=armhf),
results on an error:

/app # pip install mysql-python
Collecting mysql-python
   Downloading MySQL-python-1.2.5.zip (108kB)
     100% |████████████████████████████████| 110kB 729kB/s
     Complete output from command python setup.py 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/setup.py", line 17, in
<module>
         metadata, options = get_config()
       File "setup_posix.py", line 43, in get_config
         libs = mysql_config("libs_r")
       File "setup_posix.py", line 25, in mysql_config
         raise EnvironmentError("%s not found" % (mysql_config.path,))
     EnvironmentError: mysql_config not found

     ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-GEIJC6/mysql-python


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!



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Jun 06 2016 - 08:32:03 UTC