[Distutils] easy_install MySQL_python error

Christian Brodbeck christianmbrodbeck at gmail.com
Wed Jul 8 23:23:48 CEST 2009


Thanks to Tres and Ned for the quick help, installing form macports  
did get me a step further. Now it's having another problem which I  
can't find a solution for (readout below), but that probably belongs  
to the macports mailing list.

Cheers!
Christian


Python 2.5.4 (r254:67916, Jul  3 2009, 03:05:02)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import MySQLdb
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/MySQL_python-1.2.3c1-py2.5-linux-i686.egg/ 
MySQLdb/__init__.py", line 19, in <module>
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/MySQL_python-1.2.3c1-py2.5-linux-i686.egg/ 
_mysql.py", line 7, in <module>
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/MySQL_python-1.2.3c1-py2.5-linux-i686.egg/ 
_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/Christian/.python-eggs/MySQL_python-1.2.3c1- 
py2.5-linux-i686.egg-tmp/_mysql.so, 2): no suitable image found.  Did  
find:
	/Users/Christian/.python-eggs/MySQL_python-1.2.3c1-py2.5-linux- 
i686.egg-tmp/_mysql.so: unknown file type, first eight bytes: 0x7F  
0x45 0x4C 0x46 0x01 0x01 0x01 0x00
 >>>



On Jul 8, 2009, at 10:04 PM, Ned Deily wrote:

> In article <h32dim$rc6$1 at ger.gmane.org>,
> Tres Seaver <tseaver at palladion.com> wrote:
>> Christian Brodbeck wrote:
>>> I am trying to install MySQL_python, but I get the following error:
>>> "EnvironmentError: mysql_config not found" (complete terminal  
>>> readout
>>> below). I am using python 2.5 and the latest version of os X on a
>>> macbook. I could not find anything in the mailinglist archive (using
>>> google's site: search - is there a better way to search it?) and
>>> easy_install page advises to write to this mailinglist if there are
>>> problems, so I was wondering if anyone could help.
>>
>> Likely you need to arrange for the 'mysql_config' utility to be on  
>> the
>> PATH when you run the script:  if the utility doesn't exist, that  
>> would
>> indicate that you need to install the MySQL client libraries for your
>> system.
>
> Also, from the /opt/local/Library path in the traceback, it appears  
> that
> you're using the MacPorts python2.5.  If you don't need the absolutely
> latest MySQL_python, you should be able to install everything you need
> using MacPorts:
>
>   sudo port install py25-mysql
>
> That should pull in all the dependencies, including the necessary  
> MySQL
> client libs.
>
> -- 
> Ned Deily,
> nad at acm.org
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig



More information about the Distutils-SIG mailing list