summaryrefslogtreecommitdiff
path: root/tutorial_2_installation/slides.md
blob: 874204c753ae0af3c044b88e9088092ca4881ae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Tutorial 2: Installation
============================

Slide 1
---------------

**System Requirements:**
  - Python 3
  - python3.4-venv (Install using *apt-get install python3.4-venv*)
  - Ubuntu 16.10

Slide 2
---------------

**What is virtual environment**
  - Install Python packages from PyPI
  - Does not require root access
  - Create 'isolated' environment
  
Slide 3
----------------

**Working with virtual environments**
  - Create a virtual environment
    - python -m venv /path-to-env/directory_name
  - Activate the environment
    - source /path-to-env/bin/activate
  - Deactivate the environment
    - deactivate
  - Delete the environment and related packages
    - Delete the environment directory


Slide 4
---------------

**Create a virtual environment**
  - Creating a virtual environment in Python 3
      - *python3 -m venv /path-to-env/myapp_env*
      
Slide 5
----------------

**Activate the virtual environment**
   - *source /path-to-env/myapp_env*
   - Shell prompt will be *(myapp_env)user1:~$*

Slide 5
---------------

**Install Django**
  - pip install django
  - Check if django is installed using;
    - Command: *python -m django --version*