Registry / devops / nox
library2026.8.17pypypi✓ verified 24d ago

Nox is a command-line tool that automates development tasks like testing and linting across multiple Python environments. It utilizes a standard Python file (`noxfile.py`) for configuration, creating isolated virtual environments for each defined session. This approach provides programmatic control and reproducibility, installing specified dependencies and running commands within each isolated environment. As of version 2026.2.9, Nox is actively maintained with a regular release cadence, often following a calendar versioning scheme.

pip install nox
INSTALL
IMPORT
SIG · NOX
N
nox
devopspythonv2026.8.17
Install
2.9s avg
Import
322ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.8.17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.334s · 30.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.310s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nox
import nox
session
@nox.session
Decorator used to define a session function in noxfile.py
Session
def my_session(session: nox.Session):
Type hint for the session object passed to decorated functions

Create a `noxfile.py` in your project root to define test, lint, and format sessions. Nox will automatically create isolated virtual environments for each session, install dependencies, and execute commands. Run `nox` to execute all defined sessions, or `nox -s <session_name>` to run a specific one.

# noxfile.py import nox @nox.session(python=["3.9", "3.10", "3.11"]) def tests(session): """Run the test suite with pytest.""" session.install("pytest") session.run("pytest", "tests/") @nox.session def lint(session): """Lint source code with Flake8 and Black.""" session.install("flake8", "black") session.run("flake8", "src/", "tests/", "noxfile.py") session.run("black", "--check", "src/", "tests/", "noxfile.py") # To run these sessions, save the above as noxfile.py in your project root # and execute 'nox' in your terminal. For specific sessions, use 'nox -s tests' or 'nox -s lint'. # To run multiple Python versions, nox will create virtualenvs for each specified version. # Make sure you have python3.9, python3.10, python3.11 interpreters available on your PATH.
nox --version
Debug
Known issues
breakingThe library's package name changed from `nox-automation` to `nox`, and the configuration file from `nox.py` to `noxfile.py`. Support for Python 2.7 was dropped, and session actions shifted from declarative to imperative.
fix
Update `pip install` commands to `pip install nox`, rename `nox.py` to `noxfile.py`, and rewrite session configurations to use imperative `session.install()` and `session.run()` calls. Ensure Python 3.5+ is used for Nox itself.
affects: <=2018.8.23
gotchaNox is designed to be installed globally (or via `pipx`) in your system's Python environment, *not* within a project's virtual environment. It manages its own isolated virtual environments for each session it runs.
fix
Install `nox` using `pip install nox` (preferably `pipx install nox`) outside of any project-specific virtual environment. Do not add `nox` to your project's `requirements.txt` or `pyproject.toml` dependencies.
affects: All
gotchaEach Nox session runs in a freshly created, isolated virtual environment. Any dependencies required for a session's commands (e.g., `pytest`, `flake8`) must be explicitly installed within that session using `session.install()`.
fix
Always include `session.install('your-dependency')` at the beginning of your Nox session functions for all required packages. Do not rely on packages being available from your global environment or other sessions.
affects: All
breakingWhen using `uv` as a backend, `uv` version 0.10.0 and later now require the `--clear` flag to clear an environment.
fix
If encountering issues with `uv` environments not clearing as expected, ensure your `noxfile.py` or `nox` configuration that uses `uv` backend accounts for this change. Nox 2026.2.9 was released to support this `uv` change internally.
affects: >=2026.2.9
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'nox'
The 'nox' package was installed, but the Python environment where 'nox' was installed is not in the system's PATH, or the installation was not truly successful for the active environment.
fix
Ensure 'nox' is installed in an environment accessible from your system's PATH, or invoke it using `python -m nox`. If using a virtual environment, activate it before running `nox`.
nox > Session <session-name> skipped: Python interpreter <version> not found.
The noxfile.py specifies a Python version (e.g., python=['3.7']) that is not installed or not discoverable by nox on the system where it's being run.
fix
Install the required Python interpreter (e.g., using pyenv, conda, or system package manager) and ensure it's accessible in your system's PATH, or configure nox to download interpreters using `--download-python`.
nox > Failed to load Noxfile <path/to/noxfile.py>, no such file exists.
This error can be misleading; while it might indicate the noxfile.py is genuinely missing, it often points to a FileNotFoundError or another module-level error occurring *within* the noxfile.py itself during parsing.
fix
First, verify that `noxfile.py` exists at the expected path. If it does, meticulously debug `noxfile.py` for syntax errors, incorrect imports, or any `FileNotFoundError`s or other exceptions within its logic that prevent it from being loaded.
Program <command> not found.
A command (e.g., 'pytest', 'flake8', 'poetry') specified in `session.run()` was not installed within the Nox session's virtual environment or is not available on the system's PATH.
fix
Ensure all necessary tools and packages are explicitly installed within the Nox session using `session.install()`. For system-wide tools, confirm they are correctly installed and available in the system's PATH.
Upgrade
Version history
2026.8.17latest on PyPI · released Aug 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
8
Resources