virtualenv --python=python3.11 .venv

Category: Python & pip

virtualenv --python=python3.11 .venv

Create a venv targeting a specific Python version

Creates a virtualenv using a specific Python version (useful when multiple versions are installed).
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.