C.W.K.
Stream
Lesson 09 of 10 · published

설치와 sqlite3 CLI

~12 min · sqlite, cli, install

Level 0Scout
0 XP0/80 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

아마 이미 깔려 있어

SQLite 는 macOS, 대부분의 Linux 배포판, 모든 Python 설치본에 같이 와. Windows 도 Windows 10 부터 C runtime 의 일부로 같이 와. 이 quest 따라가는 데 별도 설치 안 해도 될 거야.

다만 시스템 거보다 최신 SQLite 를 원할 수도 있어. macOS 가 특히 Apple 큐레이팅된 옛날 빌드 (2026 기준 3.43) 를 깔아주는데, 업스트림은 3.53+ 야. 최신 버전이 STRICT 테이블, JSONB, FTS5 trigram, 최근 성능 작업에 중요해.

  • macOSbrew install sqlite 가 업스트림을 /opt/homebrew/opt/sqlite/bin/sqlite3 에 설치. PATH 추가하거나 직접 호출.
  • Ubuntu / Debiansudo apt install sqlite3 libsqlite3-dev.
  • Fedora / RHELsudo dnf install sqlite sqlite-devel.
  • Windows — sqlite.org 의 Precompiled Binaries zip 다운받아서 PATH 추가, 또는 winget install SQLite.SQLite.
  • Python 번들 SQLitepython -c 'import sqlite3; print(sqlite3.sqlite_version)'. 업그레이드하려면 보통 newer libsqlite 로 Python 재빌드, 또는 pysqlite3-binary 사용.
Tip: CLI 에선 되는데 Python 에선 안 되는 (혹은 그 반대) 일이 생기면 양쪽 버전부터 확인: sqlite3 --version + python -c 'import sqlite3; print(sqlite3.sqlite_version)'. 자주 다름 — STRICT, JSONB, 여러 PRAGMA 가 특정 버전에 들어왔어.

Code

최신 SQLite 인지 확인·bash
# CLI 버전
sqlite3 --version
# 3.53.0 2026-04-01 ... (또는 더 옛날 — Apple 의 macOS 빌드는 업스트림보다 lag)

# Python 번들 libsqlite — CLI 와 다를 때 있음
python3 -c 'import sqlite3; print(sqlite3.sqlite_version, sqlite3.version)'
# 3.43.2 2.6.0   <- libsqlite 버전, 그 다음 Python sqlite3 모듈 버전

# Python 에서 더 최신이 필요하면:
pip install pysqlite3-binary
python3 -c 'import pysqlite3; print(pysqlite3.sqlite_version)'
# 3.53.0
Fresh DB 열고 둘러보기·bash
# DB 생성/열기
sqlite3 demo.db

# REPL 안에서 — 'dot 명령' (다음 lesson)
sqlite> .help
sqlite> .databases
sqlite> .tables
sqlite> .quit

External links

Exercise

본인 머신에서 설치 경로 세 개 확인: (1) 시스템 sqlite3 CLI 버전, (2) Python stdlib sqlite3 가 링크된 libsqlite 버전, (3) brew install sqlite / 배포판 패키지 매니저로 받으면 나오는 버전. drift 기록하고 어떤 걸 daily driver 로 할지 정해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.