File "/usr/local/lib/python2.5/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/usr/local/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py", line 30, in <module> raise ImproperlyConfigured, "Error loading %s: %s" % (module, exc) ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3
Looking at the Python install, it gives the same error:
Python 2.5.2 (r252:60911, May 12 2009, 07:46:31) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 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/python2.5/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr/local/lib/python2.5/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ImportError: No module named _sqlite3 >>>
Reading on the web, I learn that Python 2.5 should come with all the necessary SQLite wrappers included. Do I need to reinstall Python, or is there another way to get this module up and running?
It seems your makefile didn"t include the appropriate
.so file. You can correct this problem with the steps below:
libsqlite3-devon some Debian-based systems)
./configure --enable-loadable-sqlite-extensions && make && sudo make install
sudo make install part will set that python version to be the system-wide standard, which can have unforseen consequences. If you run this command on your workstation, you"ll probably want to have it installed alongside the existing python, which can be done with
sudo make altinstall.
Cracking the Coding Interview PDF: 189 Programming Questions and Solutions, 6th Edition. I am not a recruiter. I am a software engineer. And as such, I know what it's like to be asked to create ing...
The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition). The Pragmatic Programmer is one of those rare technical books that you will read, reread, and re-read over...
Mark Lutz is the global leader in Python training, author of the oldest and best-selling Python texts, and a pioneer in the Python community since 1992.
Mark Lutz is the author of the found...
Automate the Boring Stuff with Python PDF, 2nd Edition: Practical Programming for Total Beginners Illustrated Edition. The second edition of this Python bestseller (over 100,000 copies sold in prin...