virtualenv tutorial python3 code example Example 1: how to use virtual environment python python3 -m venv env Example 2: create a virtualenv python3 py -m venv env