[DB-SIG] Re: Getting a custom build of python to talk to MySQL

Magnus Lycka magnus@thinkware.se
Mon, 24 Mar 2003 12:47:58 +0100


At Sun, 23 Mar 2003 11:56:37 +0200, Richard wrote:
>I have tried to get MySQL-python 0.9.1 and 0.9.2 to talk to the
>embedded python (is this the correct term?) but it will not work.
>
>This is because the python is a custom build.  As follows:
>
>Python 2.0 (#0, Jul  1 2002, 10:16:04) [MSC 32 bit (Intel)] on win32
>Type "copyright", "credits" or "license" for more information.
> >>> import MySQLdb
>Fatal Python error: Interpreter not initialized (version mismatch?)

I'm not sure the problem here is a "custom build" but rather think
that you need MySQLdb built for Python 2.0. Compiled python modules
are not usable across python versions like 2.0, 2.1, 2.2 (although
something built for 2.2.2 should work with 2.2.1 or 2.2.3 though).

Did you try: MySQL-python-0.9.1.win32-py2.0.exe ? I can't see a
Python 2.0 binary of 0.9.2 for Win32. Note that the "py2.0" part
is essential.

Can you verify that a version of MySQL-python which is usable from a
plain Python 2.0 installation fails like above in your system?


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se