Code Qualityintermediate

tox vs nox

tox vs nox compared for 2026: tox 4.67.16 (declarative tox.toml or tox.ini environments, reused between runs, MIT) vs nox 2026.10.20 (sessions written in a Python noxfile, recreated each run by default, Apache-2.0). Includes cold and warm run times with virtualenv and uv backends, parallel mode, missing-interpreter behaviour and the tox-to-nox converter from runs we did on the same machine, plus a clear pick.

Quick Answer

tox and nox both run your tests, linters and docs builds in isolated virtual environments across several Python versions, locally and in CI. tox 4.67.16 describes environments declaratively in tox.toml, tox.ini or pyproject.toml and reuses them between runs; nox 2026.10.20 describes sessions as Python functions in noxfile.py and, by default, deletes and recreates each environment on every run. In our run on three Python versions plus a lint job, the uv backends dominated: tox with tox-uv took 7.5-7.9 s cold and 3.1-3.3 s warm, nox with -db uv 5.7-12.3 s cold and 4.5-4.7 s on a plain rerun, against 20-25 s cold for tox and 16-18 s for nox on their default virtualenv backends. Pick tox for a library's standard test matrix and for contributors who expect tox -e; pick nox when your automation needs real code: conditionals, loops, conda or rattler environments, or one-off task scripts.

Last updated November 25, 2026. Covers tox 4.67.16 (23 November 2026) with tox-uv 1.37.9 and nox 2026.10.20 on Python 3.12-3.14; changelogs, docs, package metadata and repository data read on 25 November 2026, plus same-machine cold, warm, parallel, dependency-change, missing-interpreter and tox-to-nox runs we did that day.

Feature comparison of tox vs nox
Featuretoxnox
Licence & Repository
MIT; tox-dev/tox, ~4.0k stars
Apache-2.0; wntrblm/nox, ~1.6k stars
Latest Release (Nov 2026)
4.67.16 on 23 Nov 2026
2026.10.20 on 20 Oct 2026
Python Required to Run It
3.11+
3.10+
Configuration Format
tox.toml, tox.ini or pyproject.toml [tool.tox] (declarative)
noxfile.py (Python code); also PEP 723 script blocks
Environment Reuse (default)
Reused; recreated when config changes (e.g. a dependency removed) or with -r
Deleted and recreated each run; -r reuses, -R reuses and skips installs
Environment Backends
virtualenv by default; more via plugins (e.g. tox-uv)
virtualenv (default), uv, venv, conda, mamba, micromamba, rattler, none
uv Support
tox-uv plugin 1.37.9 (pulls uv 0.13.x)
Built-in backend: -db uv or venv_backend='uv' (nox[uv] extra)
Parallel Runs
tox -p auto, no opt-in needed
-j / --parallel since 2026.08.10; sessions must opt in
Version / Factor Matrix
Factors in env names (3.12, 3.13-lint) and generated env lists
@nox.session(python=[...]) and @nox.parametrize, with tags
PEP 735 Dependency Groups
dependency_groups since 4.22.0
Via helpers in a noxfile (dependency-groups package is a dependency)
Missing Interpreter (default)
Fails; --skip-missing-interpreters to skip
Skipped locally, failed on CI; --error-on-missing-interpreters
Downloading Pythons
Not built in (tox-uv can use uv-managed Pythons)
--download-python auto (default) via uv or the [pbs] extra
Passing Extra Args
tox -- args, via {posargs} / replace = "posargs"
nox -- args, read from session.posargs
Extending It
pluggy plugins
Python code in the noxfile
Recommended Install
pip install tox (add tox-uv for the uv backend)
As a global tool (README recommends pipx)
Our Run: cold, 3 Pythons + lint (default backend)
20.4-25.1 s (virtualenv + pip)
15.7-18.0 s (virtualenv + pip)
Our Run: cold, uv backend
7.5-7.9 s (tox-uv)
5.7-12.3 s (-db uv)
Our Run: second run (uv backend)
3.1-3.3 s (reused envs)
4.5-4.7 s (envs recreated)
Our Run: fastest rerun mode
3.1-3.3 s (plain rerun; no skip-install mode used)
1.04-1.14 s (-R) / 2.7 s (-r)
Our Run: parallel (uv backend)
2.2-2.6 s (-p auto)
3.4 s (--allow-parallel -j 2)

tox

tox is the long-standing Python tool for running commands in isolated environments defined in configuration: each environment lists its Python version, dependencies, dependency groups and commands, and tox builds and installs your package into it. tox 4 reads tox.toml (native TOML since 4.21.0, September 2024), tox.ini, or a [tool.tox] table in pyproject.toml, generates environments from factors such as 3.12 or 3.13, reuses them between runs and recreates them when their configuration changes. Plugins extend it, most notably tox-uv, which swaps virtualenv and pip for uv. tox 4.67.16 was released on 23 November 2026, requires Python 3.11 or newer to run, is MIT-licensed and has about 4.0k GitHub stars.

Pros

  • Reuses environments by default and adds new dependencies in place: adding pyflakes to deps installed it on the next run without a flag
  • With tox-uv, our three-Python matrix plus lint ran in 7.5-7.9 s cold, 3.1-3.3 s warm and 2.2-2.6 s with -p auto
  • Declarative config is easy to review and is the convention many Python contributors already know (tox -e 3.13)
  • Native PEP 735 dependency_groups support since 4.22.0, so test dependencies can live in pyproject.toml
  • Very active maintenance: eight 4.67.x releases between 4 and 23 November 2026, the latest fixing work-directory permissions and adding CycloneDX SBOMs to wheels
  • Built-in parallel mode (-p auto) needs no opt-in

Cons

  • On the default virtualenv and pip backend it was the slowest setup we measured: 20.4-25.1 s cold
  • Logic beyond factors and substitutions gets awkward: conditionals and loops have to be expressed as config replacements or moved into scripts
  • Inheritance can surprise: our lint env with skip_install still installed pytest, because it inherited dependency_groups from env_run_base
  • A missing interpreter fails the run by default; even with --skip-missing-interpreters true, a run where every selected env was skipped exited 1
  • Builds and force-reinstalls your package on every run: a warm run still took 6.4-6.8 s on virtualenv

Best For

Libraries with a standard test matrix across Python versions and dependency sets, projects whose contributors expect tox -e, and CI pipelines where declarative, reviewable config matters more than custom logic.

nox

nox is a command-line tool that automates testing in multiple Python environments, configured with a noxfile.py instead of an ini or TOML file. Each session is a Python function decorated with @nox.session, receives a session object with install() and run(), and can be parametrized across Python versions and arguments, tagged, and chained with notify(). nox supports virtualenv (default), uv, venv, conda, mamba, micromamba, rattler and no-environment backends, can download missing interpreters, and since 2026.08.10 can run opted-in sessions in parallel. nox 2026.10.20 was released on 20 October 2026, requires Python 3.10 or newer, is Apache-2.0 licensed and has about 1.6k GitHub stars.

Pros

  • Sessions are plain Python: conditionals, loops, environment checks and helper functions need no config tricks
  • Widest backend choice: virtualenv, uv, venv, conda, mamba, micromamba, rattler or none, selectable per session or with -db
  • -R (reuse, skip installs) reran our full matrix in 1.04-1.14 s, the fastest loop we measured on either tool
  • Missing interpreters are skipped locally (exit 0) but fail on CI by default; our 3.9 session flipped to failed with CI=1
  • Can download missing Pythons with --download-python auto (via uv, or the [pbs] extra)
  • Clear opt-in parallelism: sessions run concurrently only with allow_parallel=True or --allow-parallel

Cons

  • Recreates every environment on each run by default: a plain rerun on virtualenv took 13.6-15.2 s, almost a cold start
  • -R skips installs silently: after we added pyflakes to session.install, nox -R reused the env and pyflakes was never installed
  • nox -j 2 alone ran sequentially, because no session had opted into parallel execution (it prints a notice)
  • The tox-to-nox converter produced an invalid noxfile for our tox.toml (def 3.12(session): is a SyntaxError) and dropped the dependency group
  • Smaller project by GitHub stars than tox, with about 94 open issues and pull requests

Best For

Projects whose automation needs real code (conditional steps, generated matrices, conda or rattler environments, release and docs tasks), and teams that want a Python task runner with isolated environments rather than a test-matrix config.

Config file versus Python file

The two tools do the same job, creating isolated environments, installing your package and dependencies into them and running commands, but describe it differently. tox is declarative. Our tox.toml had an env_list of 3.12, 3.13, 3.14 and lint, an env_run_base with dependency_groups = ["test"] and a pytest command, and an env.lint table with skip_install, ruff in deps and a ruff check command: under 15 lines, no code. Environment names double as factors, so 3.13 picks the interpreter, and tox 4 adds TOML replacements, labels and generated env lists for larger matrices. nox is imperative. Our noxfile.py had a tests session decorated with python=["3.12", "3.13", "3.14"] calling session.install(".", "pytest>=9") and session.run("pytest", "-q", *session.posargs), and a lint session: also under 15 lines, but Python. The practical difference shows up when you need logic. In nox, skipping a step on Windows, reading versions from a file or looping over database backends is an if or a for loop, and @nox.parametrize with tags builds a matrix. In tox, the same thing becomes factor-conditional settings, substitutions or an external script. The flip side is review cost: a tox file can be read at a glance, while a noxfile is a program that can do anything when run, which also matters when reviewing changes to CI.

What we measured: cold, warm and parallel runs

On 25 November 2026 we ran both tools in the cloud sandbox (2 vCPU) against the same small package: three Python versions (3.12.13, 3.13.18, 3.14.6) running one pytest test each, plus a ruff lint job. Caches (pip, uv, .tox, .nox) were cleared before each cold run, and we did two rounds. On their default backends, tox (virtualenv and pip) took 20.4 and 25.1 s cold and nox (virtualenv and pip) 15.7 and 18.0 s. A second run is where the defaults diverge: tox reused its environments and took 6.4-6.8 s, mostly rebuilding and reinstalling the package, while nox deleted and recreated every environment, as its docs say it does by default, and took 13.6-15.2 s. nox -r (reuse) cut that to 6.5-7.0 s and nox -R (reuse, skip installs) to 1.09-1.14 s. Switching to uv changed everything. tox with tox-uv 1.37.9 ran 7.5-7.9 s cold, 3.1-3.3 s warm and 2.2-2.6 s with -p auto. nox -db uv ran 5.7 and 12.3 s cold (the two rounds varied widely), 4.5-4.7 s on a plain rerun, 2.7 s with -r and 1.04-1.14 s with -R. In parallel, nox -j 2 on its own ran sequentially and printed that no session allows parallel execution; with --allow-parallel it finished in 3.4 s.

Defaults that bite: reuse, installs and missing Pythons

Each tool has defaults that look harmless until they cost you. nox recreating environments on every run keeps CI honest but makes local iteration slow unless you add -r or set nox.options.reuse_venv. Its -R shortcut is fast because install() returns early, which also means changes to install lines are ignored: when we added pyflakes to the lint session and ran nox -R, the reused environment never got pyflakes and the session passed anyway. tox's reuse is smarter about this. Adding pyflakes to deps installed it on the next plain run, and removing it triggered recreate env because requirements removed. But tox's inheritance can install more than you expect: our lint environment set skip_install = true, yet tox still ran install_dependency-groups and put pytest into it, because dependency_groups was inherited from env_run_base. Missing interpreters differ too. With no Python 3.9 on the machine, tox -e 3.9 failed with could not find python interpreter and exit 1; adding --skip-missing-interpreters true marked it SKIP but the run still exited 1 because nothing ran. nox skipped the 3.9 session and exited 0 locally, failed it when CI=1 was set, and failed it with --error-on-missing-interpreters. nox can also fetch the interpreter itself with --download-python auto, which needs uv or the [pbs] extra; our virtualenv-backend run without [pbs] reported that it could not download.

Backends, uv and the 2026 release picture

Both projects ship often. tox released eight 4.67.x versions between 4 and 23 November 2026; 4.67.15 created its work directory with owner-only permissions on POSIX after environments were found group-writable under a permissive umask, and 4.67.14 began embedding a PEP 770 CycloneDX SBOM in every wheel. tox gained native TOML configuration in 4.21.0 (30 September 2024) and PEP 735 dependency groups in 4.22.0 (15 October 2024). uv support comes from the separate tox-uv plugin; 1.37.9 (18 November 2026) requires uv between 0.13.4 and 1.0, and pulled uv 0.13.10 in our install. nox uses calendar versioning. 2026.07.11 dropped Python 3.9 and cached interpreter discovery, 2026.08.10 added --parallel (then experimental), moved interpreter discovery to the python-discovery package and made unrecognised global options an error, and 2026.10.20 removed the experimental banner, added session.parallel and a rattler backend through py-rattler, and fixed bugs in script mode and tox-to-nox. nox has uv built in as a backend (the nox[uv] extra), alongside virtualenv, venv, conda, mamba, micromamba and rattler, and you can set a different backend per session. tox's own backends are virtualenv plus whatever plugins provide. If your project needs conda-style environments, nox covers that without plugins.

Limits, migration and when not to use each

Do not choose nox for a plain multi-version test matrix maintained by many contributors: it gives you a program to review where tox gives you a short config file, and its default recreate behaviour needs flags to be fast. Do not choose tox when the automation is mostly scripting, such as building docs, cutting releases or branching on platform and environment; you will end up with long command lines and helper scripts that nox would hold as functions. Do not choose either for single-environment projects where uv run pytest already does the job: both tools earn their keep when you need several isolated environments or Python versions. Migration needs care. nox ships a tox-to-nox converter (install nox[tox-to-nox]; it calls the tox executable, so tox must be on PATH). On our tox.toml it generated sessions named def 3.12(session):, which is a SyntaxError in Python, installed only the package without the pytest dependency group, and pinned the lint session to python3.13. Treat its output as a starting draft. Going from nox to tox is manual. If you only need faster tox, add tox-uv before considering a switch: in our run it cut cold time from 20-25 s to under 8 s with no config change. Both tools are free and open source (tox MIT, nox Apache-2.0).

Verdict

Pick tox, with the tox-uv plugin, for a library's standard test matrix. Its declarative tox.toml is easy to review, contributors already know tox -e, environments are reused and updated in place by default, and in our run tox-uv was the fastest tool for a normal second run (3.1-3.3 s) and in parallel (2.2-2.6 s). Pick nox when the automation is really code: steps that depend on the platform or an environment variable, matrices generated from data, conda, mamba or rattler environments, or release and docs tasks that would turn tox config into a puzzle. If you choose nox, set the uv backend (-db uv or nox.options.default_venv_backend) and use -r for everyday local runs, because its default of recreating every environment cost 13.6-15.2 s per rerun on virtualenv in our test; keep -R for the tight edit-and-test loop and remember it skips new installs. Do not run either on the default virtualenv backend in 2026 if uv is allowed in your environment: it was two to three times slower cold in every pairing we measured. Do not migrate a working tox setup to nox with tox-to-nox unattended; review and fix its output.

All Comparisons

tox vs nox — FAQ

Common questions answered from the comparison above

Is nox faster than tox?

It depends on the backend and flags. On default virtualenv backends, nox was faster cold (15.7-18.0 s vs 20.4-25.1 s) but slower on a second run (13.6-15.2 s vs 6.4-6.8 s) because it recreates environments by default. With uv, tox-uv was 3.1-3.3 s warm against nox -db uv at 4.5-4.7 s, while nox -R was fastest at about 1.1 s.

Does nox reuse virtual environments?

Not by default: its docs say it deletes and recreates them on every run. Use -r (or --reuse-venv=yes) to reuse them, or -R to reuse them and skip install steps entirely. With -R, newly added install lines are not applied, which hid a missing package in our test.

Can tox use uv?

Yes, through the tox-uv plugin, which replaces virtualenv and pip with uv. Version 1.37.9 requires uv 0.13.4 or newer below 1.0. In our run it cut a cold three-Python matrix plus lint from 20.4-25.1 s to 7.5-7.9 s without config changes.

Does tox support tox.toml?

Yes. Native TOML configuration arrived in tox 4.21.0 (30 September 2024), and tox also reads a [tool.tox] table in pyproject.toml and the classic tox.ini. PEP 735 dependency_groups are supported since 4.22.0.

Can nox run sessions in parallel?

Since 2026.08.10, yes, with -j or --parallel, and 2026.10.20 removed its experimental label. Sessions must opt in with allow_parallel=True, or you pass --allow-parallel; without that, nox prints a notice and runs sequentially, as it did for us.

How do I convert tox.ini to a noxfile?

Install nox[tox-to-nox] and run tox-to-nox with tox on your PATH. Review the result: on our tox.toml it produced invalid function names such as def 3.12(session): and left out the test dependency group, so the generated noxfile did not run as is.

Get the next comparison by email

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.