Problems installing MySQLdb on Windows [newbie]
Steve Holden
steve at holdenweb.com
Tue Dec 28 17:35:09 EST 2004
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:
>
>
>>>>import MySQLdb
>
>
> Traceback (most recent call last):
> File "<pyshell#9>", line 1, in -toplevel-
> import MySQLdb
> File "C:\Programme\Python24\lib\site-packages\MySQLdb\__init__.py",
> line 27, in -toplevel-
> import _mysql
> ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
>
> The directory structure is (only the relevant parts):
>
> C:\Programme\Python24
> |
> +-- Lib
> |
> +-- site-packages
> |
> +-- _mysql.pyd
> +-- _mysql_exceptions.py
> +-- CompatMysqldb.py
> +-- MySQLdb
> |
> +-- __init__.py
> +-- connections.py
> +-- ...
>
> One thing strikes me: in sys.path, the path to "site-packages" contains
> the dir "lib" (lowercase!) whereas in the file system it would be
> written "Lib" (mixed case). Could this pose a problem?
>
No, Windows file lookups are not case-sensitive.
> This is the path:
>
>
>>>>sys.path
>
> ['C:\\Programme\\Python24\\Lib\\idlelib', 'C:\\WINNT\\system32
> \\python24.zip', 'C:\\Programme\\Python24', 'C:\\Programme\\Python24
> \\DLLs', 'C:\\Programme\\Python24\\lib', 'C:\\Programme\\Python24\\lib
> \\plat-win', 'C:\\Programme\\Python24\\lib\\lib-tk', 'C:\\Programme
> \\Python24\\lib\\site-packages']
>
> Any hints for me?
>
> TIA
> Alex
>
I'm not sure that the Win32 installer is up to date for 2.4. I recently
mailed Andy Dustman with a copy of the up to date installer I built, but
I never had any acknowledgment and it doesn't appear to have found its
way on to SourceForge yet.
I'd suggest you use a binary installer. Remove everything that your
current install attempt dropped under site-packages, and download and run
http://pydish.holdenweb.com/pwp/MySQL-python.exe-1.0.0.win32-py2.4.exe
That's a ready-to-go no-compilation-required installer for Windows
Python 2.4, and will get you going straight away.
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
More information about the Python-list
mailing list