0

I am trying to create my first django website.I am using windows and visual studio code. I am following the tutorials given on their sitehere I have completed the part 1, now I want to use sqlite database. I have used the command

$ python manage.py migrate

Now I want to check the schema of the database created. I have tried running the command

$ python manage.py dbshell

But it is giving me error :

CommandError: You appear not to have the 'sqlite3' program installed or on your path.

I don't how to resolve.

What I did? I have installed precompiled binaries from the official site. and also downloaded sqlite3.exe from the same link. Then I created a folder in my C:/ directory and included a folder SQLite and included these 3 files: sqlite3.def, sqlite3.dll and sqlite3.exe files. And also include the path of that folder into Environment Paths. Its working in a windows command prompt. But not running in virtual environment.

Please suggest some solutions.

Ankit
  • 13
  • 2
  • This seems like an issue with your Python installation. You shouldn't need to install sqlite3 for this purpose because it [comes with Python](https://docs.python.org/3.8/library/sqlite3.html). If you just type `python --version` into the terminal, what do you see? And if you open the interactive window by typing `python` and then typing `import sqlite3`, do you get the same error? – Jan Morawiec Dec 07 '21 at 16:48
  • @JanMorawiec I see my python version as "Python 3.10.0". And after typing "import sqlite3" in the interactive window I don't get anything(I think it means that sqlite3 is already installed). – Ankit Dec 08 '21 at 03:45
  • My bad, it seems like you do indeed need that SQLite install like you did. I think it's an issue with your path in your virtual env. See [here](https://stackoverflow.com/questions/37287972/commanderror-you-appear-not-to-have-the-sqlite3-program-installed-or-on-your) for people having the same issue. You should activate your virtual env and check whether you can run sqlite3 and whether it's on your [path](https://stackoverflow.com/questions/9546324/adding-a-directory-to-the-path-environment-variable-in-windows) – Jan Morawiec Dec 09 '21 at 08:31

0 Answers0