CommandError: You appear not to have the 'sqli

2020-07-06 06:22发布

I recently installed Django to use as a web framework and I am trying use the command python manage.py dbshell to access the database shell for SQLite as said in this post: How do I access the db shell for SQLite on a Django project?. It gives me the error CommandError: You appear not to have the 'sqlite3' program installed or on your path.

I downloaded the sqlite.exe file and saved it in the directory C:\sqlite\sqlite3.exe. I then added that directory to my path in the command prompt, but it still gives the same error. Am I not adding it to my path correctly? I am using Windows 10 64 bit, but with python 32 bit installed.

I downloaded the file from https://www.sqlite.org/download.html, and I downloaded the file sqlite-tools-win32-x86-3120200.zip

4条回答
走好不送
2楼-- · 2020-07-06 06:53

After you add the directory to your PATH, close and reopen Command Prompt. This will make the changes to PATH available to your current Command Prompt session.

查看更多
一夜七次
3楼-- · 2020-07-06 06:58

One solution that works for me is that I saved the downloaded files to the folder where the file manage.py is located.

查看更多
We Are One
4楼-- · 2020-07-06 07:11

If you run it in the linux, pls install sqlite3 cli firstly

sudo apt-get install sqlite3 libsqlite3-dev
查看更多
三岁会撩人
5楼-- · 2020-07-06 07:16

I faced the same problem. Finally, I found a decision:

  • downloaded sqlite3.exe from https://www.sqlite.org/2015/sqlite-shell-win32-x86-3081002.zip and saved it to the another directory
  • added that directory to the environment variable PATH
  • closed and reopened CMD windows terminal
  • and just after that command sqlite3 worked for me and I saw a message SQLite version 3.8.10.2 2015-05-20 18:17:19 ....
查看更多
登录 后发表回答