2010-11-09 68 views
0

如果我尝试使用shell,我会遇到这个API冲突。模块_mysql的修复程序是什么:这个Python的API版本是1012,模块_mysql的版本是1013

/home/username/.python-eggs/MySQL_python-1.2.3c1-py2.6-linux-i686.egg-tmp/_mysql.so:6: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1012, module _mysql has version 1013. 

我运行:
的Python 2.6
MySQL服务器版本:5.0.77
MySQL_python-1.2.3c1

我曾尝试更新到MySQL的Python的新版本。

的easy_install-2.6〜-d/lib中/ MySQL的python2.6的 - 蟒蛇

Searching for MySQL-python 
Best match: MySQL-python 1.2.3c1 
Processing MySQL_python-1.2.3c1-py2.6-linux-i686.egg 
MySQL-python 1.2.3c1 is already the active version in easy-install.pth 

Using /home/username/lib/python2.6/MySQL_python-1.2.3c1-py2.6-linux-i686.egg 
Processing dependencies for MySQL-python 
Finished processing dependencies for MySQL-python 

如何纠正这一错误?

回答

0

错误消息意味着_mysql模块是MySQLdb的一部分,它是为Python的新版本而构建的,而不是将其加载到。 API版本1013是Python 2.5和2.6使用的版本,1012是Python 2.4使用的版本。你不会说你使用MySQLdb的方式,但显然它是由Python 2.4导入的。

+0

此错误是否危险?什么是解决方案,该怎么办? – Danijel 2014-07-01 10:11:33