• Decrease font size
  • Reset font size to default
  • Increase font size

Who's Online

We have 23 guests online

PayPal Donation

installing mysql-python adapter for mysql with sqlalchemy

Sqlalchemy by default uses mysql-python as an adapter. To be successful in installing 'mysql-python' you will need the mysql client development package installed otherwise you will get an error 'mysql_config not found' during the installation of the mysql-ptyhon package

 Error condition:

> pip install mysql-python
Downloading/unpacking mysql-python
  Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
  Running setup.py egg_info for package mysql-python
    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File ".../build/mysql-python/setup.py", line 15, 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 24, in mysql_config
        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: command not found

 To Resolve:

sudo zypper install libmysqlclient-devel
sudo pip install mysql-python
Copyright © 2000 to 2012 Linkapps.com All rights reserved.