how to start a python virtual environment using virtualenv code example Example 1: create new python environment py -m venv env Example 2: python virtualenv venv python -m venv venv