[Pythonmac-SIG] Error installing mysql-python 1.2.2 on mac os x 10.4.9

Lyndsey Ferguson lyndsey.ferguson at gmail.com
Tue Oct 30 16:57:14 CET 2007


On Oct 30, 2007, at 11:40 AM, Alessandro Censoni wrote:
> return popen(“mysql_config --%s” % what)   (1)
>                 to
> return popen(“/usr/local/mysql/bin/mysql_config --%s” % what) (2)
>
>
> In the python.py of the mysql-python-1.2.2 there isn't a line like  
> (1). While, in the file site.cfg I don't know what I have to change  
> like someone suggest to eliminate the problem of the installation.

> Can someone help me please?
>

I had many issues trying to do this.

Here is what I did:

Edit the file site.cfg so that the mysql_config path refers to /usr/ 
local/mysql/bin/mysql_config
In the terminal, type cd path/to/MySQL-Python then python setup.py  
build followed by sudo python setup.py install.

In the terminal, type ln -s /usr/local/mysql/lib /usr/local/mysql/lib/ 
mysql.

Confirm installation by typing in the Python environment, import  
MySQLdb.

I hope this helps,

Lyndsey




More information about the Pythonmac-SIG mailing list