我在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
答案 0 :(得分:0)
从消息中可以清楚地看出,您需要安装pysqlite2
。