use env in python code example
Example 1: python env
python3 -m venv tutorial-env
tutorial-env\Scripts\activate.bat (window)
source tutorial-env/bin/activate (linux)
Example 2: create an env in python
if you configured the PATH and PATHEXT variables for your Python installation:
c:\>python -m venv c:\path\to\myenv
Example 3: how to activate the pytho virtual environment
mypthon\Scripts\activate