How to Install sqlite-utils in Python
CLI tool and Python library for manipulating SQLite databases
pip install sqlite-utils
What is sqlite-utils?
CLI tool and Python library for manipulating SQLite databases
Python CLI utility and library for manipulating SQLite databases.
- Pipe JSON (or CSV or TSV) directly into a new SQLite database file, automatically creating a table with the appropriate schema - Run in-memory SQL queries, including joins, directly against data in CSV, TSV or JSON files and view the results - Configure SQLite full-text search against your database tables and run search queries against them, ordered by relevance - Run transformations against your tables to make schema changes that SQLite does not directly support, such as changing the type of a column - Extract columns into separate tables to better normalize your existing data - Install plugins to add custom SQL functions and additional features
Read more on my blog, in this series of posts on New features in sqlite-utils and other entries tagged sqliteutils.
Quick Start
Minimal example to get started with sqlite-utils:
import sqlite_utils
print(sqlite_utils.__version__)
Installation
pip (standard)
pip install sqlite-utils
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install sqlite-utils
pip3
pip3 install sqlite-utils
conda
conda install -c conda-forge sqlite-utils
Poetry
poetry add sqlite-utils
Dependencies
Installing sqlite-utils will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import sqlite_utils; print(sqlite_utils.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing sqlite-utils with pip.
ModuleNotFoundError: No module named 'sqlite_utils'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install sqlite-utils. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'sqlite_utils' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install sqlite-utils to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'sqlite_utils'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show sqlite-utils and upgrade with pip install --upgrade sqlite-utils.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install sqlite-utils. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user sqlite-utils
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org sqlite-utils
Recent Releases
| Version | Released |
|---|---|
3.39 latest |
2025-11-24 |
4.0a1 |
2025-11-24 |
4.0a0 |
2025-05-09 |
3.38 |
2024-11-23 |
3.38a0 |
2024-11-08 |
Manage sqlite-utils
Upgrade to latest version
pip install --upgrade sqlite-utils
Install a specific version
pip install sqlite-utils==3.39
Uninstall
pip uninstall sqlite-utils
Check what is installed
pip show sqlite-utils