I am doing development in Django with Google App Engine. For production I plan to use Google Cloud SQL but for local development I want to use the simple SQLITE. The Google Tutorial (https://developers.google.com/appengine/docs/python/cloud-sql/django) suggests that I run the development server with
dev_appserver.py mysite
instead of the Django default
manage.py runserver
However, when I run the development server as Google suggested I get two strange errors (I removed the rest of the stack trace for clarity):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django1.5/django/db/backends/sqlite3/base.py", line 34, in <module>
raise ImproperlyConfigured("Error loading either pysqlite2 or sqlite3 modules (tried in that order): %s" % exc)ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.5/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"
The strangest part is that when I just use manage.py runserver the site works fine. Also when I tested directly in the interactive python prompt for sqlite3 it also works:
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>>
Can anyone here help me? I'm not sure what to do next. Thanks in advance!