2017-03-07 29 views
1

我尝试在我的环境中重新安装python 2。django.core.exceptions.ImproperlyConfigured:加载pysqlite2或sqlite3模块时出错(按此顺序尝试):没有名为_sqlite3的模块

重新安装点子,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

仍然不知道是什么导致了错误?

+0

这可能有助于http://stackoverflow.com/questions/10784132/django-no-module-named-sqlite3 – Bijoy

回答

0

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

./configure 
make 
make install 

这应该解决您的问题。 (这可以在VE以外完成,我刚刚和python 3.4有相同的问题)

相关问题