MySQLdb ImportError

S

Sjoerd

Hello!

When I try to import the MySQLdb lib python generates an error:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import MySQLdb
File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 19,
in <module>
import _mysql
ImportError: DLL load failed with error code 193

This is on a AMD64 bit machine, when I import it on a 32 bit machine
it works fine.
Is there anyway to fix this? Is there a build for AMD64 bit machines
or is there simply no way
that I can get MySQLdb working on it?

Thanks in advance,
Sjoerd
 
S

Steve Holden

Sjoerd said:
Hello!

When I try to import the MySQLdb lib python generates an error:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import MySQLdb
File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 19,
in <module>
import _mysql
ImportError: DLL load failed with error code 193

This is on a AMD64 bit machine, when I import it on a 32 bit machine
it works fine.
Is there anyway to fix this? Is there a build for AMD64 bit machines
or is there simply no way
that I can get MySQLdb working on it?

Thanks in advance,
Sjoerd
I'm not aware of a current build for that architecture (and your
assumption that the load fails because of the architecture mismatch is
correct).

It is possible to build the module yourself if it's important enough. I
remember doing this some time ago with the Microsoft free compiler kit,
for example.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MySQLdb Problem 0
Cannot connect to Mysql database 4
IDLE & MySQLdb import error 0
Python not importing mysqldb 5
MySQLdb and bits 2
ImportError: No module named _gdb 3
Distutils error 2
Error Importing MySQLdb 6

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top