activating an environemnt in python code example Example 1: create new python environment py -m venv env Example 2: how to make a virtual environment in python .\env\Scripts\activate