Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 509 Bytes

python_venv.md

File metadata and controls

21 lines (17 loc) · 509 Bytes

Python Virtual Environments

Creating a Python venv

Use default system python to create a venv:

    python -m venv --clear .venv
    .venv/bin/python --version

Using a specific version of Python

If you're on Ubuntu you might need to install the venv package for your Python version e.g. 3.10-venv:

    sudo apt install python3.10-venv

You can then use the new version to create your venv:

    python3.10 -m venv --clear .venv
    .venv/bin/python3.10 --version