database sqlite3

226 views
Skip to first unread message

ben852

unread,
Dec 12, 2008, 1:51:27 PM12/12/08
to Django users
C:\Users\Benjamin\Desktop\mysite\sqlite3
SQLite3 version 3.6.6.2
Enter".help" for instructions.......

C:\Users\Benjamin\Desktop\mysite\python manage.py dbshell
Error: You appear not to have the 'sqlite3'program installed or on
your path


I have the latest version of django (SVNsubversion) and I thought
SQLite3 was automatically installed with this version.

I installed SQLite3 within the mysite directory but it appears it
does'nt work (the command "python manage.py dbshell").
I can't make changes to my database schema (chapter 5).
In SQLite3, when I execute an ALTER TABLE statement to add a new
column, I have an SQL error: no such table: books_book (book is a
class of my model).

Do I have to add a path to another directory?
Do I have to reinstall SQLite3? or to change of db? How do I do?


Thanks

CodeBandit

unread,
Dec 20, 2008, 9:26:31 AM12/20/08
to Django users
I too have this error... Windows XP... Django 1.0.2... Sqllite3 (as it
comes with Python 2.5). The sqlite3.dll file was also installed with
Firefox. I wonder if that has something to do with this.

C:\Django\mysite>manage.py dbshell
Error: You appear not to have the 'sqlite3' program installed or on
your path.

Did you ever figure it out?

mysticalfirebird

unread,
Jan 16, 2009, 2:49:45 AM1/16/09
to Django users
I have this error too,
I wonder:
is a python(sqlite3 installation) problem? or a django 1.02 problem?
my ver is 2.6.1

Malcolm Tredinnick

unread,
Jan 16, 2009, 3:03:34 AM1/16/09
to django...@googlegroups.com
On Fri, 2008-12-12 at 10:51 -0800, ben852 wrote:
> C:\Users\Benjamin\Desktop\mysite\sqlite3
> SQLite3 version 3.6.6.2
> Enter".help" for instructions.......

This suggests that the sqlite3 program is not on your normal system
paths. So Django won't be able to execute it. All Django does is call
os.execvp() to run the command, which means your normal paths are
searched.

If you can't run sqlite3 by just typing "sqlite3" -- that is, if you
have to give it any kind of directory path to find the executable -- it
isn't going to work through manage.py.

However, end of the day, this shouldn't really be a problem. The
"dbshell" management command is simply a wrapper around calling sqlite3
with the database name you specify in your settings file. So if you
don't want to or cannot (for some reason) install sqlite3 on your system
paths, just call it as you did above and pass it the name of the
database file on the command line.

Regards,
Malcolm


mysticalfirebird

unread,
Jan 16, 2009, 3:42:28 AM1/16/09
to Django users
ThX to Malcolm

I can launch sqlite3 by cmd.

Later.let me try it without "manage.py dbshell".
Reply all
Reply to author
Forward
0 new messages