11

Apparently it is supposed to be part of Python3 but it says "bash: sqlite3: command not found".

I'm so new to all of this and I'm just trying to follow along with a tutorial on youtube. Any help would be much appreciated.

4
  • 1
    No, it's not part of Python. Commented Jun 16, 2020 at 4:07
  • which OS are you on? here is somewhere to start for Windows 10: stackoverflow.com/questions/50205804/… From that thread: "So, apparently Sqlite3's CLI does not come installed with Python (Python 3.6). What comes pre-installed is Python's Sqlite3 library.So, you can access the Sqlite3 DB either through the library, or by manually installing Sqlite3 CLI." Commented Jun 16, 2020 at 4:08
  • I'm running windows 10, I saw that thread already. It didn't help. The guy above said it didn't install with Python probably so I guess I'll install it on its own. Commented Jun 16, 2020 at 4:09
  • was in my answer comment but in case you can't find it: sqlitetutorial.net/download-install-sqlite Commented Jun 16, 2020 at 16:32

2 Answers 2

9

On Linux (or in a Docker container running a Linux OS variant), you can install the command line interface via sudo apt-get install sqlite3 and then run sqlite3.

Sign up to request clarification or add additional context in comments.

Comments

2

You probably need to download the command line interface here if you want to do stuff in bash:

https://sqlite.org/download.html

Do the binaries for your OS and then just follow the instructions. You might need a program to unzip them like:

https://www.7-zip.org/

Python comes with a library for sqlite that you can import into a .py program with

import sqlite3

that you can read about here, https://docs.python.org/3/library/sqlite3.html, but that's a thing you do inside of a python program.

3 Comments

so I've created an environment and created an .sql file. The next step in the tutorial is "$ sqlite3 database.db < schema.sql" but it says command not found. I'll look though your links. I may be in a bit over my head. Do you know where I would extract the files for sqlite3? I put them in a new folder "C:\SQLite3" but I'm still not having luck.
follow along here since you're on windows: sqlitetutorial.net/download-install-sqlite Put the files in a new folder like: 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 three programs in the C:\sqlite folder as shown below: Then type this in terminal: C:\cd c:\sqlite C:\sqlite>sqlite3
This video also looks decent: youtube.com/watch?v=VZ20Lh4zbRo Try to find videos in your OS, your original post had bash shell not found which is in OS X/Linux so that makes it a pain already. If you really want, you can install WSL2 to run linux commands in windows: youtube.com/watch?v=av0UQy6g2FA learn.microsoft.com/en-us/windows/wsl/install-win10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.