Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while accessing sqlite3 shell from django application

Tags:

sqlite

django

When I run python manage.py dbshell command I get this error: Error: You appear not to have the 'sqlite3' program installed or on your path. The solution is partly hinted at in the second post of this thread. But how it can be solved on ubuntu? The python I'm using is version 2.6.

like image 899
nixnotwin Avatar asked Jan 02 '11 11:01

nixnotwin


Video Answer


2 Answers

Installing the sqlite program should solve the problem:

sudo apt-get install sqlite3

(or use synaptic if you prefer a GUI interface)

like image 143
Jarret Hardie Avatar answered Oct 24 '22 07:10

Jarret Hardie


To download SQLite, you open the download page of the SQlite website.

First, go to the https://www.sqlite.org website. Second, open the download page https://www.sqlite.org/download.html SQLite provides various versions for various platforms e.g., Windows, Linux, Mac, etc. You should choose an appropriate version to download.

For example, to work with SQLite on Windows, you download the command-line shell program as shown in the screenshot below.

The downloaded file is ZIP format and its size is quite small.

Install SQLite

Installing SQLite is simple and straightforward.

First, create a new folder e.g., C:\sqlite. Second, extract the content of the file that you downloaded in the previous section to the C:\sqlite folder. You should see the sqlite3.exe is in the C:\sqlite folder. To verify the installation, you perform the following steps:

First, open the command line window and navigate to the C:\sqlite folder.

Second, enter sqlite3, you should see the following window

Third, you can type the .help command from the sqlite> prompt to see all available commands in sqlite3.

Fourth, to quit the sqlite>, you use .quit command as follows:

Append the directory where you installed the sqlite to the system path variable in windows environment variables and kaboom. Mine worked just fine.

Happy programming...!

like image 5
taimur alam Avatar answered Oct 24 '22 07:10

taimur alam