How to Install peewee in Python

v4.0.4 General Purpose

a little orm

Install pip install peewee

What is peewee?

a little orm

Peewee is a simple and small ORM. It has few (but expressive) concepts, making it easy to learn and intuitive to use.

a small, expressive ORM flexible query-builder that exposes full power of SQL supports sqlite, mysql, mariadb, postgresql asyncio support tons of extensions use with , , , and .

Sqlite comes built-in provided by the standard-lib `` module. Other backends can be installed using the following instead:

Quick Start

Minimal example to get started with peewee:

import peewee

print(peewee.__version__)

Installation

pip (standard)

pip install peewee

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install peewee

pip3

pip3 install peewee

conda

conda install -c conda-forge peewee

Poetry

poetry add peewee

Verify the Installation

After installing, confirm the package is available:

python -c "import peewee; print(peewee.__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 peewee with pip.

ModuleNotFoundError: No module named 'peewee'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install peewee. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'peewee' (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 peewee to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'peewee'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show peewee and upgrade with pip install --upgrade peewee.

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 peewee. 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 peewee

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 peewee

Recent Releases

VersionReleased
4.0.4 latest 2026-04-02
4.0.3 2026-03-26
4.0.2 2026-03-15
4.0.1 2026-03-01
4.0.0 2026-02-20

Full release history on PyPI →

Manage peewee

Upgrade to latest version

pip install --upgrade peewee

Install a specific version

pip install peewee==4.0.4

Uninstall

pip uninstall peewee

Check what is installed

pip show peewee

Last updated: 2026-04-11 • Data from PyPI