1#------FOR LINUX/MAC---------#
2#installing venv
3sudo apt-get install python3.6-venv
4#creating virtual env
5python3 -m venv env
6#activating virtual env
7source env/bin/activate
8
9
10#-------FOR WINDOWS----------#
11#installing venv
12py -m pip install --user virtualenv
13#creating virtual env
14py -m venv env
15#activating virtual env
16.\env\Scripts\activate
17
1python3 -m venv env
2python -m virtualenv env #py2
3
4source env/bin/activate
5
6#all this is on same directory
7
1# activate python enviroment with global packages
2
3python -m venv env --system-site-packages
1(tutorial-env) $ pip freeze > requirements.txt
2(tutorial-env) $ cat requirements.txt
3novas==3.1.1.3
4numpy==1.9.2
5requests==2.7.0
6