我正在尝试使用Pypy编译器来加速我的代码。然而,我在MySQLdb模块上遇到了麻烦,因为Pypy无法找到它。
我已经阅读过MySQLdb 1.2.4应该可以与Pypy良好地配合使用,所以我升级了该模块,并测试了它是正确版本的CPython编译器。
但是使用Pypy时,我会得到以下信息:
我已经阅读过MySQLdb 1.2.4应该可以与Pypy良好地配合使用,所以我升级了该模块,并测试了它是正确版本的CPython编译器。
import MySQLdb
MySQLdb.__version__
>> '1.2.4'
但是使用Pypy时,我会得到以下信息:
Python 2.7.2 (1.9+dfsg-1, Jun 19 2012, 23:23:45)
[PyPy 1.9.0 with GCC 4.7.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``-FIRST they ignore you, then they
laugh at you, then they fight you, then you win.-''
>>>> import MySQLdb
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named MySQLdb
需要帮助吗?我正在使用运行在Ubuntu 13.04上的Pypy,该软件已经包含在Canonical仓库中。