Python2.6.4 配置Mysql问题
操作系统:window xp sp3
python版本:2.6.4
mysql:5.1
MySQLdb:MySQL-python-1.2.2.win32-py2.6.exe
在Python上配置mysql会碰到以下问题:
1、ImportError: DLL load failed: 找不到指定的模块。
解决方法:下载libmmd.dll(附件)和libguide40.dll(附件)两个dll文件并复制到python安装目录的Lib\site-packages下,或者windows/system32下。
参见:http://sourceforge.net/forum/message.php?msg_id=5613887
2、DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
解决方法:
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,
参见:http://sourceforge.net/forum/message.php?msg_id=5808948
资源下载:http://i.19830102.com/archives/164
| 打印文章 | 这篇文章由admin于2009年12月21日 5:03 下午发表在后端技术。你可以订阅RSS 2.0 也可以发表评论或引用到你的网站。 |