How to Install responses in Python

v0.26.0 General Purpose Python >=3.8 Apache 2.0

A utility library for mocking out the `requests` Python library.

Install pip install responses

What is responses?

A utility library for mocking out the `requests` Python library.

A utility library for mocking out the `` Python library.

Responses requires Python 3.8 or newer, and requests >= 2.30.0

Here you will find a list of deprecated functionality and a migration path for each. Please ensure to update your code according to the guidance.

Quick Start

Minimal example to get started with responses:

import responses

print(responses.__version__)

Installation

pip (standard)

pip install responses

Virtual environment (recommended)

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

pip3

pip3 install responses

conda

conda install -c conda-forge responses

Poetry

poetry add responses

Dependencies

Installing responses will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'responses'

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

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

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

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

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

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

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

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 responses

Recent Releases

VersionReleased
0.26.0 latest 2026-02-19
0.25.8 2025-08-08
0.25.7 2025-03-11
0.25.6 2025-01-13
0.25.5 2025-01-10

Full release history on PyPI →

Manage responses

Upgrade to latest version

pip install --upgrade responses

Install a specific version

pip install responses==0.26.0

Uninstall

pip uninstall responses

Check what is installed

pip show responses

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