0

I'm new to django. I'm trying to learn from some online video tutorial. I'm running django 1.6 and while running the command

python manage.py dbshell

then I get the error

'sqlite3' is not recognized as an internal or external command,operable program or batch file.

I then downloaded the dll files and the sqlite.exe file from their website and also added it to path. It now works on my computer normally but as it is intended, it does not affect virtualenv I'm working on and am kinda out of clue how to proceed.

I'm using django 1.6 only because the tutorial follows it.

sP_
  • 1,738
  • 2
  • 15
  • 29
  • 1
    What tutorial are you following? The official one has a 1.9 version – Sayse Feb 05 '16 at 19:08
  • @Sayse, it is some fundamentals of django tutorial in pluralsight. I didn't know the latest was 1.9 when I started following it and halfway through I realised the version he was using was different so many commands relating to sql were not working in mine. To be able to follow the tutorial I downgraded my django version and continued following till I got this error. Couldn't find a solution anywhere for windows. – sP_ Feb 05 '16 at 19:18
  • You should include the full stack trace since it might give some idea as to what is happening – Sayse Feb 05 '16 at 19:44
  • Where is the sqlite3.exe binary and how did you add it to the path? Does the path change after you activate the virtualenv? – Alasdair Feb 05 '16 at 20:25
  • @Alasdair, I stored all of it in `C:\sqlite3` directory and added it to the `PATH` in environment variable. Path remains the same when I activate the virtualenv but I don't think it can recognize anything outside of it. I added sqlite3 files and added the directory to path after working for a while in virtualenv. – sP_ Feb 05 '16 at 20:31
  • Adding that directory to the path should be enough to make `python manage.py dbshell` work. What do you get if you run `echo %path%`? – Alasdair Feb 05 '16 at 21:08
  • Have you renamed the file to `sqlite.exe`? It should be `sqlite3.exe`. – Alasdair Feb 05 '16 at 21:09

0 Answers0