How to Install Werkzeug in Python

v3.1.8 Web & HTTP Python >=3.9

The comprehensive WSGI web application library.

Install pip install Werkzeug

What is Werkzeug?

The comprehensive WSGI web application library.

werkzeug German noun: "tool". Etymology: werk ("work"), zeug ("stuff")

Werkzeug is a comprehensive [WSGI][] web application library. It began as a simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility libraries.

- An interactive debugger that allows inspecting stack traces and source code in the browser with an interactive interpreter for any frame in the stack. - A full-featured request object with objects to interact with headers, query args, form data, files, and cookies. - A response object that can wrap other WSGI applications and handle streaming data. - A routing system for matching URLs to endpoints and generating URLs for endpoints, with an extensible system for capturing variables from URLs. - HTTP utilities to handle entity tags, cache control, dates, user agents, cookies, files, and more. - A threaded WSGI server for use while developing applications locally. - A test client for simulating HTTP requests during testing without requiring running a server.

Quick Start

Minimal example to get started with Werkzeug:

import werkzeug

print(werkzeug.__version__)

Installation

pip (standard)

pip install Werkzeug

Virtual environment (recommended)

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

pip3

pip3 install Werkzeug

conda

conda install -c conda-forge Werkzeug

Poetry

poetry add Werkzeug

Dependencies

Installing Werkzeug will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'werkzeug'

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

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

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

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

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

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

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

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 Werkzeug

ConnectionError: Failed to establish a new connection

Cause: Server unreachable, URL invalid, or firewall/proxy blocking the connection.

Fix: Verify the URL and network access. Set HTTP_PROXY / HTTPS_PROXY env vars if behind a proxy.

SSLError: CERTIFICATE_VERIFY_FAILED

Cause: The remote server's SSL certificate cannot be verified.

Fix: Update CA certificates on your system. For testing only, disable SSL verification (never in production).

Recent Releases

VersionReleased
3.1.8 latest 2026-04-02
3.1.7 2026-03-24
3.1.6 2026-02-19
3.1.5 2026-01-08
3.1.4 2025-11-29

Full release history on PyPI →

Manage Werkzeug

Upgrade to latest version

pip install --upgrade Werkzeug

Install a specific version

pip install Werkzeug==3.1.8

Uninstall

pip uninstall Werkzeug

Check what is installed

pip show Werkzeug

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