venv
Stdlib — MiscPython 3.3+Beginner
Create lightweight virtual environments
Quick Info
- Documentation
- Official Docs
- Python Version
- 3.3+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import venv print(f"Module: venv") print(f"Contents: {dir(venv)[:10]}")
The venv module is part of Python's standard library. Create lightweight virtual environments.
Try in PlaygroundTags
ecosystemvirtual-environmentisolationstdlib
Related Items
virtualenv
Ecosystem
Third-party virtual environment creator (more features than venv)
conda
Ecosystem
Cross-platform package and environment manager by Anaconda
poetry
Package — Packaging
Dependency management with lockfile and virtual env
pipx
Package — Packaging
Install CLI tools in isolated environments
pyenv
Ecosystem
Manage multiple Python versions on a single machine