Original article: http:// I .19830102.com/archives/164
Python: 2.6
: Http://www.python.org/download/releases/2.6.1/
Download and install the MSI file
Mysqldb version: MySQL-python-1.2.2.win32-py2.6.exe
: Http://home.netimperia.com/files/misc/MySQL-python-1.2.2.win32-py2.6.exe
See: http://sourceforge.net/forum/forum.php? Thread_id = 2316047 & forum_id = 70460
FAQs:
1. importerror: DLL load failed: the specified module cannot be found.
----------------------------------
D:/program files/python2.6> Python
Python 2.6.1 (r261: 67517, DEC 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on Win32
Type "help", "copyright", "credits" or "License" for more information.
>>> Import mysqldb
Traceback (most recent call last ):
File "<stdin>", line 1, in <module>
File "D:/program files/python2.6/lib/Site-packages/mysqldb/_ init _. py", line 19, in <module>
Import _ MySQL
Importerror: DLL load failed: the specified module cannot be found.
----------------------------------
Solution: Download The libmmd. dll (Attachment) and libguide40.dll (Attachment) DLL files and copy them to the LIB/Site-packages directory of the python installation directory.
See: http://sourceforge.net/forum/message.php? Ms. g_id = 5613887
2. importerror: DLL load failed: the specified module cannot be found.
----------------------------------
D:/program files/python2.6> Python
Python 2.6 (R26: 66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on Win32
Type "help", "copyright", "credits" or "License" for more information.
>>> Import mysqldb
D:/program files/python2.6/lib/Site-packages/mysqldb/_ init _. py: 34: deprecationwarning: The sets module is deprecated
From Sets Import immutableset
----------------------------------
Solution:
1) file "_ init _", replace:
From Sets Import immutableset
Class dbapiset (immutableset ):
With
Class dbapiset (frozenset)
2) file "converters. py", remove:
From Sets Import baseset, Set
3) file "converters. py", change "set" by "set" (important: only two places ):
Line 48: return set ([I for I in S. Split (',') If I])
Line 128: Set: set2str,
See: http://sourceforge.net/forum/message.php? Ms. g_id = 5808948