How to Install stripe in Python

v15.0.1 General Purpose Python >=3.9

Python bindings for the Stripe API

Install pip install stripe

What is stripe?

Python bindings for the Stripe API

> [!TIP] > Want to chat live with Stripe engineers? Join us on our Discord server.

The Stripe Python library provides convenient access to the Stripe API from applications written in the Python language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Stripe API.

Alternatively, install from source with:

Quick Start

Minimal example to get started with stripe:

import stripe

print(stripe.__version__)

Installation

pip (standard)

pip install stripe

Virtual environment (recommended)

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

pip3

pip3 install stripe

conda

conda install -c conda-forge stripe

Poetry

poetry add stripe

Dependencies

Installing stripe will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'stripe'

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

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

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

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

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

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

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

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 stripe

Recent Releases

VersionReleased
15.1.0a3 2026-04-08
15.0.1 latest 2026-04-01
15.1.0a2 2026-04-01
15.1.0b2 2026-04-01
15.0.0 2026-03-26

Full release history on PyPI →

Manage stripe

Upgrade to latest version

pip install --upgrade stripe

Install a specific version

pip install stripe==15.0.1

Uninstall

pip uninstall stripe

Check what is installed

pip show stripe

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