tn-venv

Create Python virtual environments with one command — batteries included.

tn-venv is a zero-dependency, batteries-included replacement for python -m venv that picks rigorous, predictable defaults: running bare tn-venv creates ./.venv from the current interpreter, installs pip, writes activation scripts for every major shell, and records exactly how the environment was made.

$ tn-venv
==> creating virtual environment at ./.venv
interpreter: cpython 3.14.7 (64-bit) from C:\Python314\python.exe
==> installing pip (ensurepip)
==> environment ready: .\.venv\Scripts\python.exe

Feature tour

One command

Running bare tn-venv creates ./.venv with the current interpreter and pip pre-installed. No flags required — every knob has a defensible default.

Interpreter discovery

-p accepts a path, a version (3.12), a command name (python3.12), or an implementation (pypy3.10). Interpreters are located via PATH, the Windows registry, the py launcher, uv, and pyenv.

Real seeding

pip is installed through ensurepip; it can then be pinned (--pip 24.0), upgraded (--upgrade-pip), or joined by setuptools, wheel, extra packages (--with), and requirement files (-r).

Every shell

Activation scripts are generated for bash/zsh, cmd.exe, PowerShell, fish, csh/tcsh, Nushell, and the legacy activate_this.py — all in one pass.

Layered configuration

Every option is settable from the CLI, from TN_VENV_* environment variables, or from pyproject.toml / tn-venv.ini, with documented precedence.

Safe by construction

Creation runs under an inter-process lock, fails cleanly on existing environments, and never touches the network unless you ask it to (--offline).

Where to next

I want to…

Read

Install and create my first environment

Installation, Quick start

Understand every CLI flag

CLI reference

Configure defaults per project

Configuration

Pick a specific Python

Choosing an interpreter

Seed packages offline

Seeding: pip, setuptools, wheel, and beyond

Embed tn-venv in Python code

Using tn-venv from Python

Compare with venv / virtualenv / uv

tn-venv vs venv, virtualenv, and uv

Hack on tn-venv itself

Architecture