Primary
venv ⚬⃕ᵖʸ|Documentation|1st|20251021150834-00-⌔
venv — Creation of virtual environments — Python 3 documentation
venv— Creation of virtual environmentsAdded in version 3.3.
Source code: Lib/venv/
The
venvmodule supports creating lightweight “virtual environments”, each with their own independent set of Python packages installed in theirsitedirectories. A virtual environment is created on top of an existing Python installation, known as the virtual environment’s “base” Python, and by default is isolated from the packages in the base environment, so that only those explicitly installed in the virtual environment are available. See Virtual Environments andsite’s virtual environments documentation for more information.When used from within a virtual environment, common installation tools such as pip will install Python packages into a virtual environment without needing to be told to do so explicitly.
A virtual environment is (amongst other things):
- Used to contain a specific Python interpreter and software libraries and binaries which are needed to support a project (library or application). These are by default isolated from software in other virtual environments and Python interpreters and libraries installed in the operating system.
- Contained in a directory, conventionally named
.venvorvenvin the project directory, or under a container directory for lots of virtual environments, such as~/.virtualenvs.- Not checked into source control systems such as Git.
- Considered as disposable – it should be simple to delete and recreate it from scratch. You don’t place any project code in the environment.
- Not considered as movable or copyable – you just recreate the same environment in the target location.
See PEP 405 for more background on Python virtual environments.
See also: Python Packaging User Guide: Creating and using virtual environments
Availability: not Android, not iOS, not WASI.
This module is not supported on mobile platforms or WebAssembly platforms.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •