Python manage.py startapp app when error no module named _sqlite3

Source: Internet
Author: User


Python manage.py Startapp App

The error is as follows:

File "manage.py", line ten, in <module>
Execute_from_command_line (SYS.ARGV)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/core/management/__init__. Py ", line 353, in Execute_from_command_line
Utility.execute ()
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/core/management/__init__. Py ", line 327, in Execute
Django.setup ()
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/__init__.py", line +, in Setup
Apps.populate (settings. Installed_apps)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/apps/registry.py", line 108 , in populate
App_config.import_models (All_models)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/apps/config.py", line 202, In Import_models
Self.models_module = Import_module (models_module_name)
File "/usr/local/python2.7/lib/python2.7/importlib/__init__.py", line Notoginseng, in Import_module
__IMPORT__ (name)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/contrib/auth/models.py", Line 4, in <module>
From Django.contrib.auth.base_user import Abstractbaseuser, Baseusermanager
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/contrib/auth/base_user.py ", line, in <module>
Class Abstractbaseuser (models. Model):
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/models/base.py", line 108, in __new__
New_class.add_to_class (' _meta ', Options (meta, App_label))
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/models/base.py", line 307, in Add_to_class
Value.contribute_to_class (CLS, name)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/models/options.py", Line 263, in Contribute_to_class
self.db_table = Truncate_name (self.db_table, Connection.ops.max_name_length ())
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/__init__.py", line +, in __getattr__
Return GetAttr (Connections[default_db_alias], item)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/utils.py", line 212, in __ getitem__
Backend = Load_backend (db[' ENGINE ')
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/utils.py", line-in Load_backend
Return Import_module ('%s.base '% backend_name)
File "/usr/local/python2.7/lib/python2.7/importlib/__init__.py", line Notoginseng, in Import_module
__IMPORT__ (name)
File "/usr/local/python2.7/lib/python2.7/site-packages/django-1.9.13-py2.7.egg/django/db/backends/sqlite3/ base.py ", line-up, in <module>
Raise Improperlyconfigured ("Error loading either Pysqlite2 or Sqlite3 modules (tried in this order):%s"% exc)
Django.core.exceptions.ImproperlyConfigured:Error loading either PYSQLITE2 or Sqlite3 modules (tried in this order): No m Odule named _sqlite3


Solve:

1, first install Sqlite-devel

Yum Install Sqlite-devel


2, recompile install Python

./configure

Make

Make install


Python manage.py startapp app when error no module named _sqlite3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.