create python 2.7 virtual environment code example
Example 1: how to create a new virtualenv
to make a new virtualenv:
virtualenv env_name
to activate this virtual environment:
source env_name/bin/activate (on mac and linux)
source env_name/Scripts/activate (on windows)
Example 2: create a virtual environment python 3
python3 -m venv /path/to/new/virtual/environment
Example 3: how to use virtual environment python
python3 -m pip install --user virtualenv
Example 4: how to make virtual environment
virtualenv mypython