How to Install tox in Python

v4.52.1 Testing & QA Python >=3.10

tox is a generic virtualenv management and test command line tool

Install pip install tox

What is tox?

tox is a generic virtualenv management and test command line tool

aims to automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software (alongside pytest and devpi).

tox is a generic virtual environment management and test command line tool you can use for:

- checking your package builds and installs correctly under different environments (such as different Python implementations, versions or installation dependencies), - running your tests in each of the environments with the test tool of choice, - acting as a frontend to continuous integration servers, greatly reducing boilerplate and merging CI and shell-based testing.

Quick Start

Minimal example to get started with tox:

import tox

print(tox.__version__)

Installation

pip (standard)

pip install tox

Virtual environment (recommended)

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

pip3

pip3 install tox

conda

conda install -c conda-forge tox

Poetry

poetry add tox

Dependencies

Installing tox will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'tox'

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

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

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

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

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

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

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

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 tox

Recent Releases

VersionReleased
4.52.1 latest 2026-04-09
4.52.0 2026-03-30
4.51.0 2026-03-27
4.50.3 2026-03-20
4.50.1 2026-03-19

Full release history on PyPI →

Manage tox

Upgrade to latest version

pip install --upgrade tox

Install a specific version

pip install tox==4.52.1

Uninstall

pip uninstall tox

Check what is installed

pip show tox

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