【问题标题】:What are the differences among sqlite3 from python2.5, pysqlite and apswpython2.5,pysqlite和apsw的sqlite3有什么区别
【发布时间】:2010-04-09 16:03:49
【问题描述】:

我想知道sqlite3与python2.5、pysqlite和apsw的区别? 尝试使用 python2.5 在 windows vista 上安装 pysqlite 时遇到了颠簸,请参见以下内容:

  1. http://sqlite.org/download.html下载sqlite并解压到windows/system32文件夹,然后将sqlite3.dll放到c:/python25/Lib文件夹中
  2. 下载pysqlite windows installer
  3. 尝试在 python shell 中运行以下命令时:

    >>> from pysqlite2 import test
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "pysqlite2\test\__init__.py", line 35, in <module>
        from pysqlite2.test import dbapi, types, userfunctions, factory, transactions,\
      File "pysqlite2\test\dbapi.py", line 27, in <module>
        import pysqlite2.dbapi2 as sqlite
      File "pysqlite2\dbapi2.py", line 27, in <module>
        from pysqlite2._sqlite import *
    ImportError: No module named _sqlite
    

我想知道任何有上述三种sqlite绑定到python经验的人都可以评论他们的优缺点,例如性能 我想知道是否值得尝试 pysqlite 或 apsw

谢谢

【问题讨论】:

    标签: python sqlite pysqlite


    【解决方案1】:

    pysqlite 与 sqlite3 相同(内置于 python 2.5 的 windows 二进制包中)

    【讨论】:

      【解决方案2】:

      不过,pysqlite 站点包包含更多补丁。它是 2.6.0 版,而内置模块是 2.3.2 版。如果您在 pysqlite 包目录中(我在某处读过),则导入 pysqlite2.test 时可能会出现错误。

      与apsw的区别最好在http://code.google.com/p/apsw上解释

      【讨论】:

        猜你喜欢
        • 2011-08-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-05
        • 1970-01-01
        • 2010-10-02
        • 2011-12-12
        相关资源
        最近更新 更多