tn-venv vs venv, virtualenv, and uv
An honest feature comparison. Where another tool is better, this page says so.
tn-venv |
stdlib |
|
|
|
|---|---|---|---|---|
Zero runtime dependencies |
✅ |
✅ |
❌ (distlib, filelock, platformdirs) |
✅ (static binary) |
Written in |
Python |
Python |
Python |
Rust |
|
✅ |
✅ |
✅ |
❌ |
|
✅ optional |
❌ (3.12+) |
✅ |
❌ |
Pin pip at creation ( |
✅ |
❌ |
✅ (bundled wheel version) |
❌ |
Offline seeding |
✅ bundled + |
bundled only |
✅ app-data wheels |
✅ |
|
✅ |
❌ |
❌ |
❌ |
Shells with activation scripts |
7 (bash, batch, ps1, fish, csh, nu, activate_this) |
3–4 |
5+ |
4 |
|
✅ |
❌ |
✅ |
❌ |
Interpreter discovery |
PATH, PEP 514, |
current interpreter only |
PATH, registry |
PATH, managed downloads |
Can download missing Pythons |
❌ |
❌ |
❌ |
✅ |
Config files + env vars |
✅ |
❌ |
✅ ini + env |
✅ env + config |
|
✅ |
❌ |
❌ |
❌ |
Inter-process creation lock |
✅ |
❌ |
✅ (app-data) |
❌ |
Speed (cold create, Windows) |
~2–4 s |
~2–5 s |
~0.5–1 s |
~0.05 s |
Guarantees identical output to |
near-identical by design |
✅ by definition |
❌ |
❌ |
When to choose what
python -m venv— you are on a machine where installing anything is impossible, and you do not needsetuptools, extra shells, or discovery.venvis always there.virtualenv— you need its app-data seed caching (faster repeated creation), its plugin ecosystem, or support for Python < 3.11 hosts.uv venv— raw creation speed is the bottleneck (CI creating thousands of environments), or you wantuvto download the interpreter too.tn-venv— you want one memorable command with rigorous defaults, every shell’s activation script, per-project config inpyproject.toml, package installation at creation time, and a tool you can read end-to-end because it is pure, dependency-free Python.
Compatibility notes
Environments produced by tn-venv follow PEP 405
and are byte-comparable in structure to python -m venv output: same
directory layout, same pyvenv.cfg keys (plus a few documented extras,
see pyvenv.cfg reference), same binary placement on Windows
(venvlauncher.exe redirectors on Python ≥ 3.11). Anything that consumes a
standard virtual environment — IDEs, pip, tox, build frontends — treats
a tn-venv environment exactly like a venv one.