find python environment code example
Example 1: find python path windows
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
Example 2: create virtual environment code
python3 -m venv venv
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
python3 -m venv venv