开发者

What's the fix for module _mysql: This Python has API version 1012, module _mysql has version 1013

If I try to use the shell I get this API conflict.

/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.

I'm running:

Python 2.6

MySQL Server version: 5.0.77

MySQL_python-1.2.3c1

I tried unsuccessfully to update to a new version of MySQL-python.

easy_install-2.6 -d ~/lib/python2.6 MySQL-python

Searching for MySQL-python
Be开发者_JAVA百科st 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

How do I correct this error?


The error message means the _mysql module, part of MySQLdb, was built for a newer version of Python than it's being loaded into. API version 1013 is the one used by Python 2.5 and 2.6, and 1012 is the one used by Python 2.4. You don't say how you're using MySQLdb, but apparently it's being imported by Python 2.4.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜