【问题标题】:django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3django.core.exceptions.ImproperlyConfigured:加载 pysqlite2 或 sqlite3 模块时出错(按此顺序尝试):没有名为 _sqlite3 的模块
【发布时间】:2017-07-27 04:30:26
【问题描述】:

我尝试在我的环境中重新安装 python 2。

重新安装pip、setuptools

当我尝试运行 python manage.py runserver 时会抛出错误

django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3

我尝试安装 sqlite 3,它已经安装了

我尝试安装 pysqlite2 ,它已经安装了

python 2 和安装在我的 ubuntu 16.04 中,django 版本 = 1.8.X

仍然不知道导致错误的原因?

【问题讨论】:

标签: django python-2.7 python-3.x sqlite django-1.8


【解决方案1】:

对于 Ubuntu 用户: 从source下载你需要的Python版本的源文件。将文件夹解压到某处,cd进入文件夹,

./configure
make
make install

这应该可以解决您的问题。 (这可以在 VE 之外完成,我在 python 3.4 上遇到了同样的问题)

【讨论】:

    猜你喜欢
    • 2017-04-22
    • 2013-02-25
    • 2018-09-08
    • 2019-09-29
    • 2013-03-13
    • 2015-03-11
    • 2010-11-15
    相关资源
    最近更新 更多