1
00:00:00,510 --> 00:00:07,160
In this lesson we will go through the steps to set up Python development environment on Windows.

2
00:00:07,200 --> 00:00:12,630
If you already have Python installed on your Windows device you can skip this step.

3
00:00:12,930 --> 00:00:16,230
The python IDC that we will be using will be pi charm.

4
00:00:16,240 --> 00:00:21,680
Idc if you prefer using a different idea e you can do so.

5
00:00:22,850 --> 00:00:26,830
Another great option will be the Visual Studio code idc.

6
00:00:27,080 --> 00:00:32,780
This is free and you can use multiple programming languages like Python and go.

7
00:00:33,020 --> 00:00:38,200
It's becoming one of the best IDC that is out in the market for free so you can consider using this

8
00:00:38,200 --> 00:00:39,190
idea as well.

9
00:00:39,200 --> 00:00:43,290
Some say that the set up process is a bit confusing in my lesson.

10
00:00:43,310 --> 00:00:48,680
I'll be using pi term since it's easy to set up and the visual is easy to understand which makes it

11
00:00:48,680 --> 00:00:49,910
best for teaching.

12
00:00:49,910 --> 00:00:54,170
But as I said you can choose any idea you prefer.

13
00:00:54,170 --> 00:00:56,780
Now let's start installing python.

14
00:00:56,840 --> 00:01:04,260
Open your web browser and go to HDTV Colin slash less w w w dot python.

15
00:01:04,280 --> 00:01:05,890
Dot org.

16
00:01:06,170 --> 00:01:13,510
Choose the download tab and click on Download Python three point seven point two button once the download

17
00:01:13,510 --> 00:01:20,260
has completed you will see this tab on the left bottom of the window click on the tab to start the installer

18
00:01:22,500 --> 00:01:24,210
as the open the installer.

19
00:01:24,210 --> 00:01:26,430
You will see this window pop up.

20
00:01:26,490 --> 00:01:29,600
I want you to make sure you put a check on ADD.

21
00:01:29,610 --> 00:01:32,540
Python three point seven to pass.

22
00:01:32,880 --> 00:01:38,680
If you forget to put a check on this box you will need to manually set a path later on.

23
00:01:38,820 --> 00:01:46,540
Once you set the check in the box you can click on install now a message like this one may pop up click

24
00:01:46,580 --> 00:01:51,820
yes and continue the process the installation may take some time.

25
00:01:51,850 --> 00:01:59,640
So I will skip the process and go onto the screen where the installation has been completed we've successfully

26
00:01:59,640 --> 00:02:01,550
completed that installation.

27
00:02:01,620 --> 00:02:03,230
You can close this window.

28
00:02:03,660 --> 00:02:05,780
Go to the start button and click on it.

29
00:02:06,030 --> 00:02:10,370
Then choose command prompt in your command prompt screen.

30
00:02:10,410 --> 00:02:12,930
Type in Python.

31
00:02:12,930 --> 00:02:15,110
If the python shell shows on the screen.

32
00:02:15,150 --> 00:02:20,160
This means you have successfully installed Python onto your computer.

33
00:02:20,190 --> 00:02:21,090
Lets say we type.

34
00:02:21,090 --> 00:02:22,510
Print test.

35
00:02:22,650 --> 00:02:25,850
Once we hit the enter button you will see the word test.

36
00:02:25,860 --> 00:02:28,420
Print it out to exit python.

37
00:02:28,440 --> 00:02:29,220
Simply type.

38
00:02:29,220 --> 00:02:33,210
Exit followed by a parentheses and hit enter.

39
00:02:33,210 --> 00:02:38,220
You can see that the Python Shell is no longer showing.

40
00:02:38,240 --> 00:02:40,830
Now let's go onto installing the page germ IDC

41
00:02:43,970 --> 00:02:46,270
by term has two types of options.

42
00:02:46,430 --> 00:02:49,740
The professional will cost you the licence fee.

43
00:02:49,930 --> 00:02:53,050
You can see that the fee is one ninety nine per year.

44
00:02:53,170 --> 00:02:58,780
If you wouldn't be using a lot of features you can stick to the community version which is free.

45
00:02:58,780 --> 00:03:01,750
I'll be using the professional version in this lesson.

46
00:03:01,750 --> 00:03:06,700
There may be a slight difference in the layout if you will be using the community version but I don't

47
00:03:06,700 --> 00:03:09,460
think it will bother you too much.

48
00:03:09,460 --> 00:03:13,270
Here we click on the download button to start the process.

49
00:03:13,300 --> 00:03:19,200
This may take a while so I'll skip to the screen where the download has completed once you've finished

50
00:03:19,200 --> 00:03:19,920
downloading.

51
00:03:20,010 --> 00:03:27,670
You can click on this tab to launch the installer a message like this one may pop up click yes and continue

52
00:03:27,670 --> 00:03:28,360
the process.

53
00:03:29,610 --> 00:03:34,200
We can close the browser once this Windows pop up.

54
00:03:34,270 --> 00:03:44,080
Click on next here we will determine where to install the default is set to git brain pi charm folder.

55
00:03:44,160 --> 00:03:51,360
Here we will also click on Next go on hitting next until the installation process begins again.

56
00:03:51,360 --> 00:03:57,250
This may take some time so I will skip to the screen where the installation process has been completed.

57
00:03:57,300 --> 00:04:00,430
Here we have complete in installing pi term.

58
00:04:00,720 --> 00:04:06,770
We want to immediately run pi terms so we will put a check in this box and hit the finished button.

59
00:04:07,410 --> 00:04:15,410
Once the PI Jem launches you can click OK in this window hit next on the right lower corner and the

60
00:04:15,410 --> 00:04:22,070
screen you will be asked if you wish to download some plugins I'll be installing and enable the idea

61
00:04:22,130 --> 00:04:30,650
then if you're not familiar with vids I recommend not to install the vim may affect on how to write

62
00:04:30,650 --> 00:04:34,080
your commands.

63
00:04:34,090 --> 00:04:41,210
Now let's hit the start using pi charm button this window will be asking you if you want to activate

64
00:04:41,330 --> 00:04:42,990
the PI tram license.

65
00:04:43,130 --> 00:04:46,070
Here we can click on evaluate for free.

66
00:04:46,070 --> 00:04:54,050
Now we click on evaluate button once the PI term is launched click on Create new project in this window

67
00:04:54,050 --> 00:05:00,230
we will choose pure Python on the top here we can create the name of the project.

68
00:05:00,390 --> 00:05:07,260
In this lesson we will be programming drones so we can set it to p y Tello with the name of the drone.

69
00:05:07,290 --> 00:05:11,860
If you don't like the same feel free to change it to any project name you wish.

70
00:05:11,870 --> 00:05:13,980
Next click on project interpreter.

71
00:05:15,130 --> 00:05:19,450
The default setting will be set to use virtual EMV.

72
00:05:19,510 --> 00:05:25,150
You may not be familiar with it so we will be using the python three point seven point two which we

73
00:05:25,150 --> 00:05:26,050
just installed.

74
00:05:27,280 --> 00:05:30,860
Jews existing interpreter and click on the dots.

75
00:05:31,420 --> 00:05:35,530
Now choose system interpreter located on the left side.

76
00:05:35,860 --> 00:05:40,120
The default interpreter will be showing the one we just installed.

77
00:05:40,120 --> 00:05:44,940
If it is not set as an interpreter click on the dots to manually set the path.

78
00:05:45,960 --> 00:05:48,450
Once we are done setting the interpreter here.

79
00:05:48,510 --> 00:05:48,980
OK.

80
00:05:50,430 --> 00:05:56,880
As you see that the existing interpreter is set as Python 3 you can click on Create.

81
00:05:56,980 --> 00:06:00,690
You may find this tutorial window but we'll just skip it here.

82
00:06:00,820 --> 00:06:06,640
I want you to check the left side corner of the screen where you will find P Y tallow which is the project

83
00:06:06,640 --> 00:06:08,880
name we created earlier.

84
00:06:09,100 --> 00:06:18,250
Right click on the P Y Tello and choose new then choose new python file let's get the file name to Main

85
00:06:18,280 --> 00:06:28,570
and press OK under the P Y Tello folder you will find the new file name dot P Y in this file we will

86
00:06:28,570 --> 00:06:31,470
set print test to run this code.

87
00:06:31,480 --> 00:06:35,400
We need to set the configuration on your right corner.

88
00:06:35,440 --> 00:06:43,990
You will find add configuration click on it to open up this window click on the plus button and choose

89
00:06:43,990 --> 00:06:45,890
python.

90
00:06:45,930 --> 00:06:49,970
You can set the name to whatever is easy for you to understand.

91
00:06:50,130 --> 00:06:54,810
In this example I will set it to go.

92
00:06:54,920 --> 00:06:57,440
Now we need to choose the script path.

93
00:06:57,440 --> 00:07:03,730
If you click on that file icon on the right you will see main dot P Y which we created earlier.

94
00:07:03,770 --> 00:07:05,620
Now press open.

95
00:07:06,020 --> 00:07:10,000
Check to see if the Python interpreter is set to Python three point seven.

96
00:07:10,790 --> 00:07:14,130
If it is all correct click OK.

97
00:07:14,870 --> 00:07:21,260
After you added the configuration you will see a tab with go and agreeing try and like on.

98
00:07:21,260 --> 00:07:26,800
On the right corner once you click on this green triangle the process will start.

99
00:07:27,320 --> 00:07:31,810
You will find the results of your script on the bottom of the screen.

100
00:07:31,820 --> 00:07:35,210
I also want to introduce you to the debugger function.

101
00:07:35,630 --> 00:07:40,340
Let's set a variable a with 10 and print a.

102
00:07:40,880 --> 00:07:46,120
You can click the blank next to the number and you will see this red circle appear.

103
00:07:46,160 --> 00:07:51,500
Now go onto the right corner to find a bug shape button once you press this button.

104
00:07:51,530 --> 00:07:53,610
You will be in debugger mode.

105
00:07:53,840 --> 00:07:59,560
The process will stop at the breakpoint which is where you set the red circle.

106
00:07:59,590 --> 00:08:06,960
You can see the value set in variable a and also see the result showing the bottom of your screen you

107
00:08:06,960 --> 00:08:12,090
can use this debugger mode to check how the script is processing and also find any errors that you may

108
00:08:12,090 --> 00:08:12,600
have made.

109
00:08:13,620 --> 00:08:19,500
Let's hit the red square button to stop debugger mode and also don't forget to click on the breakpoint

110
00:08:19,500 --> 00:08:27,280
to delete it in the lessons we will mainly be using the screen button to run the script and the debugger

111
00:08:27,280 --> 00:08:31,630
about these features will be supported in the community version.

112
00:08:31,650 --> 00:08:36,870
So for those of you who will not be using more features you don't have to get the professional version

113
00:08:38,530 --> 00:08:40,920
although we've completed all the steps.

114
00:08:40,930 --> 00:08:46,350
There are a few more setting changes that I will make for you so you can see my script better.

115
00:08:46,840 --> 00:08:48,390
If you prefer these changes.

116
00:08:48,430 --> 00:08:50,830
Feel free to adjust your settings as well.

117
00:08:52,620 --> 00:09:02,940
Now go on to the left top corner two files choose settings and here choose appearance for the theme.

118
00:09:02,990 --> 00:09:08,670
Choose high contrast next head apply.

119
00:09:08,900 --> 00:09:10,360
You can see the color change.

120
00:09:10,370 --> 00:09:13,430
Now choose Intel E.J. and hit apply.

121
00:09:14,300 --> 00:09:18,200
You'll see that the entire screen changed to a brighter color.

122
00:09:18,220 --> 00:09:26,510
Also I will go on to choose editor here I'll choose font and change the font size to 30 as I hit the

123
00:09:26,510 --> 00:09:27,390
play button.

124
00:09:27,390 --> 00:09:33,750
You can see that the font size became larger choose key map and search run using the search bar.

125
00:09:35,110 --> 00:09:42,450
You can find run and the default chalky key set to shift F ten I can change the settings by double clicking

126
00:09:42,450 --> 00:09:51,000
on run choose keyboard shortcut here I will change the shortcut to control F and set the second stroke

127
00:09:51,060 --> 00:09:59,960
also just stroke f then hit OK if you've already set a shortcut key you may get this morning in my case

128
00:09:59,990 --> 00:10:04,860
I will want to run the script with control F so I'll choose remove.

129
00:10:05,360 --> 00:10:11,720
Now we hit the okay button to go back to the script earlier I had the green triangle button to run the

130
00:10:11,720 --> 00:10:18,990
script as we set the shortcut key I can type control F twice and you will see the results printed out

131
00:10:18,990 --> 00:10:21,720
without hitting the green triangle.

132
00:10:21,720 --> 00:10:27,770
Now let's go to view on the top left of the screen here you will find toolbar.

133
00:10:28,080 --> 00:10:33,900
Once you click this you will see that the buttons have moved to the left side here.

134
00:10:33,930 --> 00:10:37,010
You will also see some more functions.

135
00:10:37,100 --> 00:10:37,830
OK.

136
00:10:37,830 --> 00:10:40,580
Finally we completed setting up the environment.

137
00:10:40,710 --> 00:10:44,790
So now let's go on to the next lesson and start programming the drones.
