Virtual Environments
Virtual environments are the foundation of every reliable Python project. The handbook explains what a venv is, why you need one, and how to manage Python interpreters and isolated environments with modern tools.
Concepts
Tools
Migration paths
More Virtual Environments pages
Everything else tagged virtual-environments, grouped by section. Pages featured above are not repeated here.
How To
Explanation
Reference
From the blog
Posts tagged virtual-environments.
-
uv 0.8 Release: Automatic Python Installation to PATH
uv 0.8 adds automatic Python executable installation to PATH, making uv-managed Python versions available system-wide.
-
Managing Python Versions In Your uv Projects
How .python-version files, requires-python, and uv work together to manage Python versions in your projects.
-
Why Use uv Projects Instead of requirements.txt?
Comparing requirements.txt and pyproject.toml approaches to Python dependency management, and why uv projects offer more.
-
Flexible Python Version Management with uv and tox
Solve tox Python version mismatch errors by using uvx to run tox with any Python version on demand.
-
Require pip to install packages in virtual environment
Configure pip to only install packages inside virtual environments using the global.require-virtualenv setting.
-
Quick start guide for Python development on a Mac
A quick start guide for setting up Python on macOS using pyenv and Poetry, with a note on the modern uv alternative.