如何在FreeBSD上的python中使用sqlite3?

时间:2016-06-15 05:49:44

标签: python sqlite freebsd

我想在sqlite3 python FreeBSD 10.3使用python。安装...... =========================================================================== Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as: bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter =========================================================================== 后,它会提示我应安装以下附加软件包:

4

从这个post开始,在安装上述sqlite3个软件包之后,impore sqlite3应该能够正常运行。但是&#34; >>> import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module> from _sqlite3 import * ImportError: No module named _sqlite3 &#34;仍报告以下错误:

<uses-permission android:name="android.permission.INTERNET"/>

我应该安装哪些其他包?

1 个答案:

答案 0 :(得分:1)

找到了根本原因,我安装了 databases / sqlite3 ,而不是 databases / py-sqlite3 。安装 databases / py-sqlite3 后,它可以正常工作。