python environ code example

Example 1: python virtual environment

python3 -m venv env
python -m virtualenv env #py2

source env/bin/activate

#all this is on same directory

Example 2: python env

python3 -m venv tutorial-env
tutorial-env\Scripts\activate.bat (window)
source tutorial-env/bin/activate (linux)

Example 3: python virtual environment

python3 -m pip install --user virtualenv

Example 4: python virtual environment

source env/bin/activate

Example 5: python os module

#the os module provides an operating system interface from Python
import os
#prints the name of the operating system
print(os.name)
#prints the absolute path for the module
print(os.getcwd())