【问题标题】:How do I configure the sqlite3 module to work with Django 1.10?如何配置 sqlite3 模块以使用 Django 1.10?
【发布时间】:2017-05-01 20:30:37
【问题描述】:

所以问题是显然 Django 使用了 python 中包含的 sqlite3,我的计算机上有 sqlite3,它可以自己正常工作。我已经尝试了很多方法来解决这个问题,但还没有找到解决方案。

请告诉我如何解决此问题,以便我可以在我的计算机上使用 Django。

:~$ python Python 3.5.2 (default, Nov 6 2016, 14:10:16) [GCC 6.2.0 20161005] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ImportError: No module named '_sqlite3' &gt;&gt;&gt; exit()

【问题讨论】:

标签: linux django python-3.x ubuntu sqlite


【解决方案1】:

我发现这个错误是由于我将 python 路径从默认的 2.7 更改为 3.5 造成的。

【讨论】:

    猜你喜欢
    • 2011-01-27
    • 1970-01-01
    • 2015-09-29
    • 2018-11-01
    • 2017-10-01
    • 1970-01-01
    • 2021-09-29
    • 2015-02-13
    • 1970-01-01
    相关资源
    最近更新 更多