python3 -m venv --upgrade .venv

Category: Python & pip

python3 -m venv --upgrade .venv

Upgrade the virtual environment to match a newer Python version

Upgrades an existing virtual environment to match a newer Python version while keeping packages.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.