0

我在 python 中使用 pattern-2.5 中的 pattern.db 模块来创建数据库,但是当我运行它时,会出现一条消息:

Traceback (most recent call last):
  File "cobadb.py", line 25, in <module>
    db = Database('my_stuff')
  File "/usr/local/lib/python2.7/dist-packages/pattern/db/__init__.py", line 381, in __init__
    _import_db(type)
  File "/usr/local/lib/python2.7/dist-packages/pattern/db/__init__.py", line 54, in _import_db
    import pysqlite2.dbapi2 as sqlite
ImportError: No module named pysqlite2.dbapi2
4

1 回答 1

0

从消息中可以清楚地看出,您需要安装pysqlite2.

于 2013-03-22T13:37:48.310 回答