How to Install pendulum in Python

v3.2.0 General Purpose Python >=3.9 MIT License

Python datetimes made easy

Install pip install pendulum

What is pendulum?

Python datetimes made easy

>>> nowinparis = pendulum.now('Europe/Paris') >>> nowinparis '2016-07-04T00:49:58.502116+02:00'

# Seamless timezone switching >>> nowinparis.intimezone('UTC') '2016-07-03T22:49:58.502116+00:00'

>>> tomorrow = pendulum.now().add(days=1) >>> lastweek = pendulum.now().subtract(weeks=1)

Quick Start

Minimal example to get started with pendulum:

import pendulum

print(pendulum.__version__)

Installation

pip (standard)

pip install pendulum

Virtual environment (recommended)

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

pip3

pip3 install pendulum

conda

conda install -c conda-forge pendulum

Poetry

poetry add pendulum

Dependencies

Installing pendulum will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'pendulum'

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

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

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

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

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

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

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

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 pendulum

Recent Releases

VersionReleased
3.2.0 latest 2026-01-30
3.1.0 2025-04-19
3.0.0 2023-12-16
3.0.0b1 2023-09-30
3.0.0a1 2022-11-23

Full release history on PyPI →

Manage pendulum

Upgrade to latest version

pip install --upgrade pendulum

Install a specific version

pip install pendulum==3.2.0

Uninstall

pip uninstall pendulum

Check what is installed

pip show pendulum

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