(Google AI Devcamp 2024)[Google%20AI%20Devcamp%202024]
venv is the official tool.
Run this in the folder you want teh virtual Python environment
python -m venv .venv
It will create a .venv folder.
To use it, it must be "activated":
Activate the virtual environment
source .venv/bin/activate for unix
source .venv/Scripts/activate for Windows (in a bash shell)
Deactivate the virtual environment
source .venv/bin/deactivate for unix
source .venv/Scripts/deactivate for Windows (in a bash shell)
Check the active virtual environment
which python
it should point to the .venv folder.