• My Errors
  • Login
  • Search
Search again

Error #73718

EnvironmentError: mysql_config not found

When trying to install MySQL-python 1.2.2

User's solution

This works!
+2 Vote Up

Install MySQL 3.23.32 or higher

http://www.mysql.com/downloads/

The setup.py script uses mysql_config to find all compiler and linker options, and should work as is on any POSIX-like platform, so long as mysql_config is in your path.

May 27, 2008

Comments

I'm having the same problem, should i put the MySQL-python-1.2.2 folder in the same folder as mySql? and where is this folder in Ubuntu? plzzz help.

user42197 Dec 06, 2008

You must specify where your mysql installation resides. For me, I had to un-comment the line in file site.cfg to read: mysql_config = /usr/local/mysql/bin/mysql_config whereas by default it searched in: mysql_config = /usr/local/bin/mysql_config

user61181 Mar 09, 2009

simply run under ubuntu: sudo apt-get install libmysqlclient-dev python2.6-dev and then : sudo easy_install MySQL-python

bartosak May 04, 2010

bless you bartosak

user122687 Jul 18, 2011

thank u bartosak

user123155 Jul 26, 2011

you just saved me a lot of time bartosak

user123602 Aug 22, 2011

I replaced mysql_config function with the following to avoid using 'mysql_config' on debian lenny. Made it. def mysql_config(what): a = {} a ['libs_r'] = '/usr/lib/libmysqlclient_r.so.15' a ['libs'] = '/usr/lib/libmysqlclient.so.15' a ['cflags'] = ['-I/usr/include/mysql/'] a ['include'] = ['-I/usr/include/mysql/'] return a [what]

user123914 Sep 15, 2011

Thank you so much. It was a pretty easy fix with you instructions bartosak

user124311 Oct 13, 2011