﻿1
00:00:00,560 --> 00:00:01,700
‫Welcome back.

2
00:00:01,880 --> 00:00:08,990
‫In this video, I would like to show you how to install Python and the necessary libraries in order

3
00:00:08,990 --> 00:00:12,500
‫for you to be able to run the simulations in Python.

4
00:00:12,650 --> 00:00:23,120
‫If you have Ubuntu 20.04 like I have it here, then python 3.8 should come by default along with numpy.

5
00:00:23,600 --> 00:00:26,390
‫You can check the version in terminal like this.

6
00:00:26,630 --> 00:00:31,820
‫Python three and then two dashes and then version.

7
00:00:32,210 --> 00:00:42,010
‫So you see I have python 3.8.5 and you can check the version of numpy like this Python three dash.

8
00:00:42,020 --> 00:00:53,750
‫See then you put here a quotation mark, import numpy semicolon print and then you're going to put here

9
00:00:54,290 --> 00:01:03,230
‫num py dot then you have two underlines here and then you're going to put version, then another two

10
00:01:03,230 --> 00:01:07,130
‫underlines and then another quotation mark here.

11
00:01:07,640 --> 00:01:11,510
‫So here I have known py 1.7.4.

12
00:01:12,050 --> 00:01:14,370
‫That's what I received by default.

13
00:01:14,390 --> 00:01:21,020
‫These two things I received by default when I installed my Ubuntu 20.04.

14
00:01:21,590 --> 00:01:27,680
‫If you don't have python 3.8, then you can install it with these commands.

15
00:01:28,190 --> 00:01:31,880
‫Sudo apt update.

16
00:01:32,480 --> 00:01:34,550
‫Then you put your password here.

17
00:01:34,790 --> 00:01:48,830
‫So it will give you some upgrades and then you will write sudo which is superuser then apt install software.

18
00:01:49,340 --> 00:01:54,110
‫Dash properties dash common.

19
00:01:54,860 --> 00:02:00,560
‫Then I'm going to write sudo add dash.

20
00:02:01,370 --> 00:02:08,660
‫APT repository ppa colon dead snakes.

21
00:02:09,170 --> 00:02:12,500
‫Then slash and ppa.

22
00:02:12,770 --> 00:02:26,510
‫So I'm going to press enter and then I'm going to write sudo apt and then update then sudo apt install

23
00:02:26,840 --> 00:02:37,850
‫python 3.8 and then to check the version you write Python three, dash dash version.

24
00:02:38,270 --> 00:02:54,830
‫And then if you don't have numpy, you can add it like this sudo apt update then sudo apt install python

25
00:02:54,830 --> 00:02:57,590
‫three dash.

26
00:02:57,620 --> 00:03:05,910
‫Pip pip is a python package installer, so you check the version of your pip.

27
00:03:05,930 --> 00:03:12,950
‫So pip for python three would be pip three, then dash dash and then version.

28
00:03:13,190 --> 00:03:14,570
‫So here it is.

29
00:03:14,690 --> 00:03:20,650
‫And now you write pip three install py.

30
00:03:25,850 --> 00:03:35,120
‫And now you write pip three install mad plot lib to equal signs.

31
00:03:39,560 --> 00:03:41,740
‫And now you can run the code.

32
00:03:41,750 --> 00:03:43,530
‫But this is very important.

33
00:03:43,550 --> 00:03:49,510
‫You have to run it in Linux terminal or Windows Command prompt.

34
00:03:49,520 --> 00:03:54,230
‫Do not use ides like Spider or Jupyter Notebook.

35
00:03:54,680 --> 00:03:58,130
‫The animation does not want to work well in there.

36
00:03:58,160 --> 00:04:04,610
‫The most robust way is to run it from terminal or from Windows Command prompt.

37
00:04:05,210 --> 00:04:06,950
‫So I have a file here.

38
00:04:06,950 --> 00:04:12,380
‫Calculus sym pid train dot pi and I want to run it.

39
00:04:12,680 --> 00:04:16,670
‫So in my terminal I will go to my desktop.

40
00:04:16,670 --> 00:04:21,530
‫So change directory or CD desktop enter.

41
00:04:21,950 --> 00:04:26,090
‫I can see all my stuff here with an LZ command.

42
00:04:26,360 --> 00:04:36,680
‫And so in order to run this file, I'm going to write Python three and then calculus sym pid train py

43
00:04:37,160 --> 00:04:38,330
‫and there you go.

44
00:04:38,330 --> 00:04:39,290
‫It works.

45
00:04:39,740 --> 00:04:42,260
‫So that has been in Linux.

