Alex Meier wrote: > hi, all! > > this is my first contact with python, I installed python 2.4 (on Win2k) > and unzipped the MySQLdb package "MySQL-Python 1.0.0 for win32" into > Lib/site-packages. > > However, when I try to import the MySQLdb package, I am faced with the > error message "DLL load failed", in more detail: >
(1) RTFHomePage (FIRST SENTENCE): """MySQL versions 3.22, 3.23 and 4.0; and Python versions 1.5.2-2.3 are supported. """ Background: A .pyd has to be linked against a specific PythonXY.dll; see point (4) below. (2) A package which doesn't provide an installer but merely invites you to unzip everything into .../lib/site-packages is a bit dodgy. If you had have followed the instructions blindly, you would have ended up with a directory called mysql-python-1.0.0.win32-py2.3 [eeee, look, "2.3"] as a child of site-packages. (3) "Lib" versus "lib" is not the problem; if you examine your traceback, you will see that it found "Lib" even though "lib" was specified. Windows file names are not case-sensitive. However there can be Python-imposed problems which can be overcome (in the remote event that you meet these problems) by using the PYTHONCASEOK environment veriable. (4) Why you are getting the "DLL not found" message is beyond me, given your description of what you've done. Perhaps the picture is being obscured by your using "pyshell". What you should have got is something like this [I've extracted _mysql.pyd into my junk directory]: C:\junk>python Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import _mysql Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: Module use of python23.dll conflicts with this version of Python. >>> (5) But the _mysql.pyd appears to be a bit suspect anyway: C:\junk>\python23\python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import _mysql Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: _mysql: init failed >>> (6) I suggest that you contact the package maintainer. -- http://mail.python.org/mailman/listinfo/python-list