﻿1
00:00:00,660 --> 00:00:01,920
‫Welcome back.

2
00:00:01,950 --> 00:00:10,260
‫So let's now instal python and its libraries for Mac OS and we're going to use the latest version which

3
00:00:10,260 --> 00:00:11,280
‫is big.

4
00:00:11,280 --> 00:00:20,820
‫So let's start with going to the Python website and now we're going to go to downloads, all releases.

5
00:00:21,060 --> 00:00:29,520
‫And I would not like to download Python 3.9 because I want to make sure that all the other libraries

6
00:00:29,520 --> 00:00:35,040
‫that I'm going to be using, that they are fully ready for that version.

7
00:00:35,340 --> 00:00:42,780
‫And so all my tests have been successful with Python 3.8.7.

8
00:00:43,080 --> 00:00:53,010
‫And so we're going to go to Mac OS and we're going to download the Mac OS 64 bit into the installer

9
00:00:53,190 --> 00:00:55,800
‫for Python 3.8.7.

10
00:00:55,980 --> 00:01:02,730
‫Do you want to allow downloads on w w w dot python dot org and of course allow.

11
00:01:03,030 --> 00:01:05,940
‫And so I'm going to go to the downloads folder.

12
00:01:06,180 --> 00:01:09,870
‫So here's the installer that I'm going to click on.

13
00:01:10,170 --> 00:01:17,610
‫And so now I have this text, I'm going to click Continue, I'm going to read everything again, I'm

14
00:01:17,610 --> 00:01:26,040
‫going to click Continue and of course I'm going to read everything, continue, agree and install.

15
00:01:26,310 --> 00:01:35,040
‫And then here I have to put my system password with which you log in into your system and so it will

16
00:01:35,040 --> 00:01:37,020
‫start installing Python.

17
00:01:37,230 --> 00:01:45,510
‫And so at some point I will have this folder here with these files and I can just ignore this folder

18
00:01:45,510 --> 00:01:47,820
‫and here you can see that.

19
00:01:47,820 --> 00:01:57,870
‫Congratulations, Python 3.8.7 for Mac OS is successfully installed and now we don't need the installer

20
00:01:57,870 --> 00:01:58,410
‫anymore.

21
00:01:58,410 --> 00:02:00,390
‫So we move it to trash.

22
00:02:00,690 --> 00:02:06,030
‫We can close this folder and we can close this website as well.

23
00:02:06,210 --> 00:02:14,430
‫And now let's test if our python is installed correctly, I'm going to use terminal in order to launch

24
00:02:14,430 --> 00:02:15,960
‫my python programs.

25
00:02:16,140 --> 00:02:18,420
‫I would recommend you to do the same.

26
00:02:18,540 --> 00:02:27,120
‫I would not recommend you to use ides such as Spider or Jupyter Notebook.

27
00:02:27,480 --> 00:02:32,040
‫The animations might not work if you launch your programs from there.

28
00:02:32,040 --> 00:02:36,750
‫The most robust way is to launch them from terminal.

29
00:02:36,990 --> 00:02:46,110
‫And now let's go into our desktop folder CD Desktop CD stands for change directory.

30
00:02:46,350 --> 00:02:55,050
‫So I have a python file here test dot py and I'm going to open it with the idle.

31
00:02:55,260 --> 00:03:00,030
‫I'm going to ignore the shell and I'm going to go where the program is written.

32
00:03:00,300 --> 00:03:03,720
‫Now I don't care about the numpy nor pillar right now.

33
00:03:03,720 --> 00:03:09,270
‫I just want to know if my python is working properly for that.

34
00:03:09,270 --> 00:03:14,220
‫I'm just going to right here print hello world and then exit.

35
00:03:14,520 --> 00:03:17,220
‫That will end the program at that point.

36
00:03:17,400 --> 00:03:25,110
‫And so if I close this file then it's going to ask me if I want to save it and I'm going to say yes,

37
00:03:25,320 --> 00:03:27,720
‫I'm going to close the shell as well.

38
00:03:28,050 --> 00:03:38,640
‫And then here, when I'm in my desktop folder in my terminal, I'm going to write Python three and then

39
00:03:38,640 --> 00:03:42,660
‫the name of the file test dot py.

40
00:03:42,840 --> 00:03:45,660
‫And as you can see it prints hello world.

41
00:03:45,930 --> 00:03:49,110
‫So our python is working very good.

42
00:03:49,320 --> 00:03:58,350
‫But now if I go back to our program and then I delete all this stuff and leave the original program,

43
00:03:58,650 --> 00:04:08,220
‫if I save it now and close the shell and run the program now, then I will get an error because I don't

44
00:04:08,220 --> 00:04:19,080
‫have a numpy library in your terminal right CD so that you would get out of your desktop folder and

45
00:04:19,080 --> 00:04:22,530
‫be in your default home folder again.

46
00:04:23,100 --> 00:04:28,560
‫Before we can install numpy though we have to install pip.

47
00:04:28,950 --> 00:04:32,760
‫Pip is a python package management system.

48
00:04:32,910 --> 00:04:41,790
‫For that we go to safari and then we're going to go to this website, pip dot piper.

49
00:04:41,790 --> 00:04:49,050
‫So P y p a dot io here we go to installation.

50
00:04:49,380 --> 00:04:55,230
‫We're going to make sure that we have Unix or Mac OS here, not windows.

51
00:04:55,470 --> 00:05:00,060
‫And then we're going to come here where you have installing with.

52
00:05:00,200 --> 00:05:03,950
‫Get Dash, peep that pie.

53
00:05:04,310 --> 00:05:13,130
‫And then we're going to copy this line and we're going to paste it into our terminal here and press

54
00:05:13,130 --> 00:05:13,850
‫enter.

55
00:05:13,940 --> 00:05:23,510
‫And then you have to go back to the website and copy this link as well, and then you can paste it here

56
00:05:23,510 --> 00:05:24,740
‫in your terminal.

57
00:05:25,010 --> 00:05:30,500
‫And before you press enter, you have to put here Python three.

58
00:05:30,650 --> 00:05:35,480
‫So a small modification and then you press enter.

59
00:05:35,690 --> 00:05:44,090
‫And now it started installing it and now you have successfully installed the Python package management

60
00:05:44,090 --> 00:05:52,430
‫system, PIP, and now you can write pip install numpy to two equals signs.

61
00:05:55,340 --> 00:05:58,350
‫And now you have successfully installed numpy.

62
00:05:58,370 --> 00:06:00,140
‫1.99.3.

63
00:06:00,500 --> 00:06:03,740
‫And now you can write CD desktop.

64
00:06:04,100 --> 00:06:06,710
‫Now you enter into your desktop folder.

65
00:06:07,010 --> 00:06:13,610
‫Now, before we run our file, let's enter into our file again through Idle.

66
00:06:13,940 --> 00:06:17,330
‫At this point, we don't care about the pillow library.

67
00:06:17,630 --> 00:06:22,400
‫That's the library that you need when you work with images.

68
00:06:22,610 --> 00:06:24,680
‫At this point, we're going to ignore it.

69
00:06:24,890 --> 00:06:27,590
‫We just want to test numpy.

70
00:06:27,830 --> 00:06:34,460
‫And so we're going to right here print and p dot py and then we're going to write here exit.

71
00:06:34,730 --> 00:06:38,990
‫And so if our numpy works, then we should get a py value.

72
00:06:39,110 --> 00:06:42,950
‫So when we close it, then it asks us to save it.

73
00:06:42,980 --> 00:06:43,730
‫We're going to click.

74
00:06:43,730 --> 00:06:44,420
‫Yes.

75
00:06:44,690 --> 00:06:50,900
‫We're going to close the shell and we're going to write Python three and then test that.

76
00:06:50,900 --> 00:06:51,590
‫PY.

77
00:06:51,800 --> 00:06:54,710
‫And as you can see, we get our py value.

78
00:06:55,040 --> 00:07:04,370
‫And that means that our numpy library works in your terminal write cd so that you would get out of your

79
00:07:04,370 --> 00:07:10,100
‫desktop folder and be in your default home folder again.

80
00:07:10,490 --> 00:07:13,430
‫And now we have to install matlab.

81
00:07:13,520 --> 00:07:20,510
‫For that, we write pip install method lib two equals sines and then.

82
00:07:22,560 --> 00:07:31,380
‫And so we have successfully installed our method WLIB and now we write CD desktop because our Python

83
00:07:31,380 --> 00:07:34,110
‫file is in the desktop.

84
00:07:34,380 --> 00:07:42,240
‫And so if we run an animation file here that requires MATLAB, then you can see that the animation is

85
00:07:42,240 --> 00:07:42,930
‫working.

86
00:07:43,320 --> 00:07:45,300
‫Of course, it's very slow.

87
00:07:45,980 --> 00:07:52,790
‫But that's because I'm running the simulation and recording the screen at the same time, and that's

88
00:07:52,790 --> 00:07:53,240
‫it.

89
00:07:53,270 --> 00:07:59,810
‫Now you have all the necessary libraries in case you use the MAC system as well.

90
00:07:59,990 --> 00:08:01,830
‫So I'll see you in the next video.

91
00:08:01,850 --> 00:08:03,020
‫Thank you very much.

