virtual env in python 3.9 code example Example 1: virtual environment python python3 -m venv env Example 2: virtual environment python source env/bin/activate