1
00:00:00,210 --> 00:00:00,810
Hi everyone.

2
00:00:00,810 --> 00:00:06,660
Welcome to the installation and setup lecture before we can continue if all the awesome technical material

3
00:00:06,660 --> 00:00:08,390
and content and actually start coding.

4
00:00:08,550 --> 00:00:10,510
We need to get your environment set up first.

5
00:00:10,710 --> 00:00:14,910
However if you've already taken some technical courses or maybe you've already taken some of my own

6
00:00:14,910 --> 00:00:17,770
courses you may already have what we actually need.

7
00:00:18,060 --> 00:00:21,870
So I want to quickly go over just in general what we actually need to be able to do.

8
00:00:21,960 --> 00:00:26,780
And if you're able to do these forming ideas you may be able to just get this installation lecture entirely

9
00:00:26,790 --> 00:00:32,890
so me quickly describe what you should be able to do by the end of this install and of lecture first.

10
00:00:32,970 --> 00:00:36,420
You're going to need to have access to your command line either through the command prompt in windows

11
00:00:36,720 --> 00:00:40,940
or terminal in Mac OS or Linux and you pretty much already have that built in.

12
00:00:40,940 --> 00:00:42,590
You'll need to know where it is.

13
00:00:42,750 --> 00:00:50,080
Then you should have some sort of text editor such as Adam sublime notepad plus plus visual studio etc..

14
00:00:50,310 --> 00:00:54,840
We're going to be using and installing Adam for this course something I want to make very very clear

15
00:00:54,840 --> 00:00:59,820
is if you're an experienced developer and you already have your preferred development environment maybe

16
00:00:59,820 --> 00:01:03,770
you really love sublime or you really love visual studio please feel free to use it.

17
00:01:03,810 --> 00:01:04,820
Don't feel constrained.

18
00:01:04,830 --> 00:01:10,110
Adam We just happened to use it for this course because it's open source but really you have full freedom

19
00:01:10,230 --> 00:01:12,500
as far as what editors you want to choose.

20
00:01:12,540 --> 00:01:16,100
All the code we do here is going to work on any editor.

21
00:01:16,260 --> 00:01:19,390
Once you have a text editor then we just need to install Python.

22
00:01:19,410 --> 00:01:20,910
We don't use Python immediately.

23
00:01:20,910 --> 00:01:26,050
We're going to enter by H.M.S. SS and bootstrap first and the crash courses then we'll touch upon python.

24
00:01:26,280 --> 00:01:31,110
And then lastly you need to be able to install Python libraries through either a condo install or a

25
00:01:31,110 --> 00:01:32,260
Pippin's stall.

26
00:01:32,400 --> 00:01:37,440
We actually provide a requirements that textfile they can easily run in one simple one line command

27
00:01:37,740 --> 00:01:41,290
to create an environment that has all the libraries we use in this course.

28
00:01:42,620 --> 00:01:43,200
OK.

29
00:01:43,440 --> 00:01:48,240
So here I have some time stamps because maybe you don't need everything we just covered in that list

30
00:01:48,540 --> 00:01:49,600
but you may want some of that.

31
00:01:49,650 --> 00:01:55,080
So look at this slide and then go to the time stamp for what you need if you need all of it then just

32
00:01:55,080 --> 00:01:58,440
continue watching and come along of us for this entire lecture.

33
00:01:58,470 --> 00:02:00,630
But in general we're going to set up Python.

34
00:02:00,750 --> 00:02:03,090
We're going to set up Adam which is our text editor.

35
00:02:03,090 --> 00:02:06,930
We're going to show you how to add a terminal to Adam so there's a little plus but you can click and

36
00:02:06,930 --> 00:02:11,100
have a terminal directly and Adam will show you how to add plug into the adult to make your life a little

37
00:02:11,130 --> 00:02:12,820
easier when you're editing text.

38
00:02:12,970 --> 00:02:14,360
And then we'll also show you how to style it.

39
00:02:14,380 --> 00:02:17,940
Adam things like adding particular color schemes to Adam.

40
00:02:18,060 --> 00:02:21,380
And then finally at the end we'll try to create an environment for flask.

41
00:02:21,600 --> 00:02:22,860
OK let's get started.

42
00:02:22,980 --> 00:02:23,280
All right.

43
00:02:23,280 --> 00:02:29,240
Here we are at the Anaconda com slash download page and it may look slightly different for you.

44
00:02:29,240 --> 00:02:34,560
As far as styling is concerned but there should be three main links one for Windows one for Mac OS and

45
00:02:34,560 --> 00:02:35,220
one for Linux.

46
00:02:35,220 --> 00:02:38,860
On this page Anaconda's going to come with lots of data science packages.

47
00:02:38,860 --> 00:02:40,340
That's why it's a distribution.

48
00:02:40,350 --> 00:02:44,390
It also comes with package management as well as environment management with Conda.

49
00:02:44,430 --> 00:02:46,680
So that's a tool we're going to be using as well.

50
00:02:46,680 --> 00:02:50,310
So go ahead and click on the operating system that's relevant to you.

51
00:02:50,670 --> 00:02:55,690
For Windows you're going to want to install the Python 3 version and I recommend the graphical installer.

52
00:02:55,710 --> 00:02:59,520
There's a 64 bit version and a 32 bit version that depends on your computer.

53
00:02:59,610 --> 00:03:04,790
Then for Mac OS if you're a Mac OS I would also recommend doing the graphical installer here.

54
00:03:04,810 --> 00:03:07,010
So go ahead and download that graphical installer.

55
00:03:07,110 --> 00:03:12,560
And if you're on Linux there is an installer right here for you for 64 bit as well as an installer for

56
00:03:12,570 --> 00:03:13,590
32 bit.

57
00:03:13,860 --> 00:03:18,660
OK so once you've downloaded that actual installer in order to receive instructions on how to download

58
00:03:18,660 --> 00:03:23,880
it after you click on whatever your relevant operating system is you should notice that there's a link

59
00:03:23,880 --> 00:03:25,930
here how to install Anaconda.

60
00:03:26,040 --> 00:03:32,130
Go ahead and click on that link and it will take you to Dock's and Akala dot com slash Anaconda slash

61
00:03:32,160 --> 00:03:35,250
install and then slash your operating system.

62
00:03:35,250 --> 00:03:37,980
So here we have the instructions for installing on Windows.

63
00:03:38,040 --> 00:03:41,730
And for most of these it's quite straightforward especially for the graphical installers you're just

64
00:03:41,730 --> 00:03:43,350
clicking along.

65
00:03:43,380 --> 00:03:49,410
The only thing I want to clarify is as you go along you'll notice that there's an advanced installation

66
00:03:49,440 --> 00:03:55,830
option set and this is going to ask you if you want to add anaconda to my path environment variable.

67
00:03:56,100 --> 00:04:02,810
If you click on this it will turn red and say Not recommended we personally recommend clicking on that

68
00:04:02,910 --> 00:04:05,940
and adding anaconda to your path environment variable.

69
00:04:05,940 --> 00:04:09,750
That way you can actually call Python and Konda at your command line.

70
00:04:09,750 --> 00:04:14,530
So again we highly recommend that you add anaconda to my past environment variable.

71
00:04:14,580 --> 00:04:17,010
That way you can call Python at your command line.

72
00:04:17,010 --> 00:04:21,690
So even though it says not recommended go ahead and check that box anyways you'll see the text turned

73
00:04:21,690 --> 00:04:23,710
red and then hit install.

74
00:04:23,940 --> 00:04:27,480
So again if you're ever asked at Anaconda to my path var. variable.

75
00:04:27,480 --> 00:04:29,670
Make sure you select that option.

76
00:04:30,170 --> 00:04:31,980
OK so that's the option for Windows.

77
00:04:31,980 --> 00:04:37,890
Again if you click on here for any of the other operating system such a Mac OS and click on how to install

78
00:04:37,920 --> 00:04:43,600
Anaconda it will take you to the Mac OS graphical install instructions page which is right here again.

79
00:04:43,620 --> 00:04:45,230
Essentially it is following along.

80
00:04:45,270 --> 00:04:49,940
And again if it ever asks you to add anaconda to your path go ahead and select yes to that.

81
00:04:49,980 --> 00:04:55,990
Even if it says it's not recommended for Linux users it's not going to be a graphical installer.

82
00:04:55,990 --> 00:05:01,260
If you click on how to install anaconda it's basically just going to be a bash command to wherever you

83
00:05:01,260 --> 00:05:03,750
happen to have downloaded that h file.

84
00:05:04,210 --> 00:05:06,790
OK so that's the very basics of downloading.

85
00:05:06,800 --> 00:05:07,750
Anaconda.

86
00:05:07,980 --> 00:05:13,350
Once you've downloaded anaconda you should be able to run Python at your command line after you've finished

87
00:05:13,350 --> 00:05:15,000
the installation process.

88
00:05:15,000 --> 00:05:17,000
So let's go ahead and show you what that should look like.

89
00:05:17,200 --> 00:05:19,870
OK we're going to quickly show you how to run Python.

90
00:05:19,890 --> 00:05:24,090
This is going to be a confirmation that you've already downloaded and gone through the installer for

91
00:05:24,090 --> 00:05:25,240
Anaconda.

92
00:05:25,260 --> 00:05:29,410
All we need to do here is open up our command line for Windows users.

93
00:05:29,510 --> 00:05:34,500
Are going to do a search for see M.D on your computer and that will open up your command prompt.

94
00:05:34,530 --> 00:05:39,710
If you're on Mac OS or Linux you can search for terminal and that will open up your command line.

95
00:05:39,720 --> 00:05:40,440
Let's do this.

96
00:05:40,440 --> 00:05:44,840
I'm going to win this computer right now so I will search for ACMD and then open up my command prompt.

97
00:05:45,710 --> 00:05:47,720
All right here I am at my command prompt.

98
00:05:47,740 --> 00:05:52,540
If you're on a Mac OS or Linux you should be at your terminal in order to check the Anaconda installed

99
00:05:52,540 --> 00:05:55,470
correctly directly into your command line.

100
00:05:55,480 --> 00:05:56,860
Type the word Python.

101
00:05:56,920 --> 00:05:59,520
Hit enter and then you should see Python.

102
00:05:59,570 --> 00:06:03,630
The version number and then some sort of clarification of Anaconda.

103
00:06:03,700 --> 00:06:07,990
And once you've done this then you've successfully installed Anaconda in Python on your computer.

104
00:06:07,990 --> 00:06:14,030
And if you want to keep testing things out you can print something like Hello enter and you have hello.

105
00:06:14,080 --> 00:06:17,770
Hopefully you've already worked with Python by the time you reach this course since this is a course

106
00:06:17,770 --> 00:06:20,010
for more experienced Python users.

107
00:06:20,020 --> 00:06:23,280
I'm going to quit out of this and we're ready to go.

108
00:06:23,290 --> 00:06:25,420
Remember that for basic command lines.

109
00:06:25,480 --> 00:06:28,930
In order to actually change directories you can use the see the command.

110
00:06:29,080 --> 00:06:32,210
And this works in either Mac OS Linux or Windows.

111
00:06:32,380 --> 00:06:37,750
To go back up at the rectory you just say change directory thought and that will move back up at the

112
00:06:37,750 --> 00:06:40,330
Rectory to move forward into another folder.

113
00:06:40,330 --> 00:06:43,480
You can say CD and then the name of the folder.

114
00:06:43,480 --> 00:06:48,330
So for example I can move back into that folder where I was by using CD.

115
00:06:48,340 --> 00:06:50,410
That's really the main command you need to know for this course.

116
00:06:50,410 --> 00:06:51,790
Just change in the rectory.

117
00:06:51,790 --> 00:06:55,000
That way you can run your python script wherever it's located.

118
00:06:55,000 --> 00:06:57,690
Let's now move on to setting up our environment.

119
00:06:57,730 --> 00:07:01,350
Since you've already set up Anaconda and Python all right.

120
00:07:01,360 --> 00:07:06,430
Now let's set up our development environment and this course we use the Adam text editor.

121
00:07:06,430 --> 00:07:11,410
If you already have your preferred development environment such as sublime or pi charm or any other

122
00:07:11,410 --> 00:07:17,020
number of ideas that are available Feel free to stick with those as long as you can run a PI script

123
00:07:17,260 --> 00:07:18,260
at your command line.

124
00:07:18,280 --> 00:07:21,320
You're pretty much good to go and you can skip this part of the lecture.

125
00:07:21,490 --> 00:07:25,300
If you do want to explore falling along in this course with the added text editor.

126
00:07:25,450 --> 00:07:27,380
Keep watching and go to Adam.

127
00:07:27,520 --> 00:07:32,710
Oh and let's show you how you can install atom and set up the plugin as well as the terminal command

128
00:07:32,710 --> 00:07:34,110
line there.

129
00:07:34,120 --> 00:07:36,210
OK here am Adam the I O.

130
00:07:36,280 --> 00:07:40,930
You should notice that somewhere on the screen there going to be a download button that's going to automatically

131
00:07:40,930 --> 00:07:45,730
detect your operating system and you can just click here on this download and it should download some

132
00:07:45,730 --> 00:07:49,370
sort of executable installer file and then you'll just double click that.

133
00:07:49,390 --> 00:07:51,950
Follow all the defaults and install Adam.

134
00:07:51,970 --> 00:07:56,620
It's a simple text editor comes off a lot of really useful features especially if you're a big abuser

135
00:07:56,840 --> 00:07:57,210
Adams.

136
00:07:57,250 --> 00:07:59,240
Open source and it was created by it.

137
00:07:59,410 --> 00:08:02,180
So that's one of our reasons for choosing it for this course.

138
00:08:02,200 --> 00:08:05,470
As I mentioned you're free to use any platform you like.

139
00:08:05,470 --> 00:08:10,990
They also notice there's packages and themes so packages are basically other packages that can help

140
00:08:10,990 --> 00:08:11,990
you work with Adam.

141
00:08:12,100 --> 00:08:15,510
Things like Python autocomplete so I'll be using those as well.

142
00:08:15,520 --> 00:08:21,580
Themes are things that can help you change the appearance of Adam such as fonts or coloring so you can

143
00:08:21,580 --> 00:08:22,310
do that all.

144
00:08:22,360 --> 00:08:23,320
Adam as well.

145
00:08:23,500 --> 00:08:24,930
So there's packages and themes.

146
00:08:25,000 --> 00:08:30,220
Go ahead and download and install Adam onto your computer and then let's open it up and show you how

147
00:08:30,220 --> 00:08:32,730
you can install plugins and packages.

148
00:08:32,860 --> 00:08:33,210
All right.

149
00:08:33,220 --> 00:08:38,500
Once you've downloaded and installed Adam following along the defaults for the graphical installer you

150
00:08:38,500 --> 00:08:41,000
should see something like this when you open out them.

151
00:08:41,050 --> 00:08:46,200
However you may notice that my font or coloring is a little different than what you see as the default.

152
00:08:46,210 --> 00:08:49,120
And that's because I've customized Adam to my liking.

153
00:08:49,120 --> 00:08:51,930
So let's show you how you can do the same for your installation.

154
00:08:51,970 --> 00:08:57,630
You'll just come to file and then go down where it says settings and you should see the core settings.

155
00:08:57,640 --> 00:08:58,460
Open up.

156
00:08:58,510 --> 00:09:07,840
I notice you have here packages themes and then install as well as updates so packages are things that

157
00:09:07,900 --> 00:09:12,580
help you actually work better with whatever programming environment or programming languages you're

158
00:09:12,580 --> 00:09:13,320
using.

159
00:09:13,330 --> 00:09:16,740
So I have autocomplete Python which we're going to be using during this course.

160
00:09:16,810 --> 00:09:22,810
I will show you how to install just a second theme's that's going to be things like colorization or

161
00:09:22,990 --> 00:09:24,130
syntax themes.

162
00:09:24,310 --> 00:09:31,000
So I have added material in a one dark as my user interface theme and as my syntax theme so you can

163
00:09:31,000 --> 00:09:32,640
copy and use those as well.

164
00:09:32,820 --> 00:09:37,890
They do updates once you've installed packages or themes you can update them and then you have install.

165
00:09:38,080 --> 00:09:42,180
So go ahead and come to install and then we need two main packages.

166
00:09:42,280 --> 00:09:47,070
Go ahead and search for Python with packages selected here.

167
00:09:47,140 --> 00:09:52,520
It's going to search packages for Python and then you'll eventually see someone at the very top autocomplete

168
00:09:52,540 --> 00:09:57,280
Python and I've already have it installed so you don't see the install button here but you're going

169
00:09:57,280 --> 00:09:59,350
to use something like this install button.

170
00:09:59,350 --> 00:10:04,480
So go ahead and install autocomplete Python as I'm coding along and this course you'll notice a little

171
00:10:04,480 --> 00:10:09,580
bit of a drop down selection that helps you autocomplete your Python functions or Python commands.

172
00:10:09,580 --> 00:10:11,710
That's the package that allows me to do that.

173
00:10:11,830 --> 00:10:16,830
The next package you'll probably want is the a terminal package.

174
00:10:16,900 --> 00:10:20,120
So go ahead and search for terminal with packages.

175
00:10:20,130 --> 00:10:24,100
Select that and the one we like to use is platform you.

176
00:10:24,260 --> 00:10:28,360
Ideally dashed terminal and again install this package.

177
00:10:28,360 --> 00:10:31,770
What this allows you to do is once you've installed this.

178
00:10:31,990 --> 00:10:38,160
If you click here on the plus button it will open up a new terminal inside of Adam.

179
00:10:38,170 --> 00:10:44,290
That way you can call Python here right from inside of Adam without having to change anything.

180
00:10:44,380 --> 00:10:49,810
So I can quote here and then we're going to be doing is we're going to say Python and then be running

181
00:10:49,810 --> 00:10:52,380
scripts inside of atom as such.

182
00:10:52,570 --> 00:10:58,480
What I want to point out is for Windows users by default it uses the power shell and usually the power

183
00:10:58,480 --> 00:11:01,710
shell has issues with the Anaconda installation.

184
00:11:01,720 --> 00:11:07,450
So what you're going to want to do is after you've installed the platform in the terminal what you should

185
00:11:07,450 --> 00:11:10,350
do is especially if you're on a Windows computer.

186
00:11:10,690 --> 00:11:15,840
Edit this so that instead of using your power shell by default it eases your command prompt by default.

187
00:11:15,940 --> 00:11:18,000
Again this is only for Windows users.

188
00:11:18,040 --> 00:11:19,390
It's a very quick fix.

189
00:11:19,450 --> 00:11:25,040
You just come to packages and either search for terminal or scroll down to you'll find terminal.

190
00:11:25,090 --> 00:11:31,000
The number you already installed terminal at this point click on settings and then somewhere along this

191
00:11:31,060 --> 00:11:36,800
you should see Shell override where you're going to do is write this command right here.

192
00:11:36,940 --> 00:11:43,670
You're going to have a point to see Windows system 32 C M D E X.

193
00:11:43,710 --> 00:11:47,190
E because by default it's going to point to power shell.

194
00:11:47,200 --> 00:11:49,090
Again this is only for Windows users.

195
00:11:49,180 --> 00:11:53,740
If you're a Mac OS or Linux it's going to automatically point to a terminal and you shouldn't have any

196
00:11:53,740 --> 00:11:54,850
issues.

197
00:11:54,860 --> 00:11:58,740
All right so that's a shell overwrite and that's an important step for Windows users.

198
00:11:58,780 --> 00:12:04,210
Using the terminal inside of Adam the last thing I ought to point out is editing colors and themes.

199
00:12:04,300 --> 00:12:12,360
As I mentioned if you come over to the core settings and click on themes I'm using atom material in

200
00:12:12,450 --> 00:12:14,440
one dark as my syntax theme.

201
00:12:14,490 --> 00:12:20,220
If you ever want to install those you just come to install click on themes and then search whatever

202
00:12:20,220 --> 00:12:26,810
themes you want such as one dark enter and you can see the one dark you find that I have installed.

203
00:12:27,000 --> 00:12:28,460
So that's an option for you.

204
00:12:28,470 --> 00:12:32,310
A lot of times you can play around if you like a light setting you can do that as well if you like a

205
00:12:32,310 --> 00:12:33,200
darker setting.

206
00:12:33,270 --> 00:12:39,060
You can do that and if you google search more Adam actually has the ability to put custom CSSA scripts

207
00:12:39,120 --> 00:12:41,520
so you can color this however you see it.

208
00:12:41,910 --> 00:12:43,380
OK that's really all there is to Adam.

209
00:12:43,380 --> 00:12:48,000
The main thing here we're just installing it setting up Python autocomplete setting up this terminal

210
00:12:48,000 --> 00:12:53,310
so you can call Adam and show you how to install themes and syntax themes.

211
00:12:53,330 --> 00:12:53,810
All right.

212
00:12:53,820 --> 00:12:56,630
Now they've installed Anaconda in Python to computer.

213
00:12:56,640 --> 00:13:03,070
It's time to set up the environment now technically it's optional to set up a virtual environment with

214
00:13:03,070 --> 00:13:10,030
the com the command line tool a virtual environment basically allows you to create a version of Python

215
00:13:10,120 --> 00:13:16,180
and certain library installations on your computer that will hold that actual versioning of the pit

216
00:13:16,390 --> 00:13:17,760
installed libraries.

217
00:13:17,920 --> 00:13:22,900
That way you don't need to worry in case Dasch has an upgrade later on into the future.

218
00:13:22,900 --> 00:13:27,880
You're going to be able to run our notes securely and make sure they work in your virtual environment

219
00:13:28,420 --> 00:13:31,780
so we're going to be using Pipp install to install the required libraries.

220
00:13:31,780 --> 00:13:35,040
You can use pitmen staw with or without that virtual environment.

221
00:13:35,050 --> 00:13:37,450
However we do recommend using that virtual environment.

222
00:13:37,530 --> 00:13:43,230
That way you basically have a container that can hold the specific versions of dash and you can play

223
00:13:43,240 --> 00:13:46,860
around future versions of plotline in a separate virtual environment.

224
00:13:46,860 --> 00:13:52,120
So for convenience we've already created a requirements text file that you can use this requirements

225
00:13:52,120 --> 00:13:57,730
that textfile is essentially just a list of libraries to install with Pipp so it'll be really easy to

226
00:13:57,730 --> 00:14:02,350
use that at your command line to just have a single line that installs all the libraries will be using

227
00:14:03,570 --> 00:14:07,650
in order to actually use that requirements that textfile at the command line you're going to need to

228
00:14:07,650 --> 00:14:13,410
see the or change directory at your command line to wherever you see the unzipped version of the court's

229
00:14:13,470 --> 00:14:14,880
notes or files.

230
00:14:14,880 --> 00:14:19,250
So make sure you've already downloaded the unzipped version of the course notes files.

231
00:14:19,260 --> 00:14:21,450
So usually we provide them as a zip file.

232
00:14:21,480 --> 00:14:27,330
You'll download them unzip and then there should be a requirement that text file in that actual folder

233
00:14:27,360 --> 00:14:28,690
that was unzipped.

234
00:14:28,710 --> 00:14:33,660
So let's go to our command line find the requirements that text file and show you can create a virtual

235
00:14:33,660 --> 00:14:37,870
environment and then easily install all the libraries required for the course.

236
00:14:38,010 --> 00:14:44,280
OK here I am in my downloads folder I've already downloaded the flask bootcamp zip file from the course

237
00:14:44,340 --> 00:14:46,790
overview lecture which has a resource there.

238
00:14:46,830 --> 00:14:51,890
If you're wondering how you get this zip file please go back and watch the course overview lecture.

239
00:14:51,890 --> 00:14:53,120
We explain they're all there.

240
00:14:53,220 --> 00:14:56,800
It's also linked as a resource in the fake Q lecture.

241
00:14:56,940 --> 00:14:59,800
Once you have this zip file you can need to unzip it.

242
00:14:59,820 --> 00:15:03,620
You can use any program you want to extract or unzip this.

243
00:15:03,630 --> 00:15:05,970
So I'm on Windows so I'll just click extract all.

244
00:15:06,150 --> 00:15:11,020
If you're on Mac OS there is something called the archive utility which will automatically extract this.

245
00:15:11,110 --> 00:15:17,310
OK so once you extract that I'm going to fast forward in time and here underneath my extracted flask

246
00:15:17,310 --> 00:15:21,420
bootcamp folder I have another folder called flat's boot camp so you can see it's kind of a double nested

247
00:15:21,420 --> 00:15:27,540
naming scheme and we have all the folders for the course in order so we start off with the team L C

248
00:15:27,590 --> 00:15:28,840
Ss and bootstrap.

249
00:15:28,860 --> 00:15:32,150
We have some command line options here for text.

250
00:15:32,310 --> 00:15:38,220
Each team Allen crash course CSSA etc and everything's numbered in essentially the order you would take

251
00:15:38,220 --> 00:15:39,510
it in the course.

252
00:15:39,510 --> 00:15:44,690
So if we come back here then we have the python sections by I level 1 level 2 then we get into floss

253
00:15:44,700 --> 00:15:48,050
basics template basics etc. and so on.

254
00:15:48,330 --> 00:15:51,780
At the very bottom you can see a requirements not textfile.

255
00:15:52,200 --> 00:15:57,030
If you double click on that let's not rename it just double click and open it you'll see it's essentially

256
00:15:57,060 --> 00:16:04,160
a list of Python libraries such as flask or flask log in and then the particular version number what

257
00:16:04,170 --> 00:16:09,930
we're going to do is we're going to create a flask environment and then install all these requirements

258
00:16:10,140 --> 00:16:11,520
into that environment.

259
00:16:11,520 --> 00:16:17,790
That way when you activate your environment you can have the exact same libraries and code that we did

260
00:16:17,790 --> 00:16:21,990
when we were developing this course and what that means is you're going to have in an environment where

261
00:16:21,990 --> 00:16:25,110
we guarantee that our DOT PI scripts will work.

262
00:16:25,320 --> 00:16:30,330
So you can always use or thought postscripts with an environment to make sure and double check.

263
00:16:30,360 --> 00:16:32,280
In case you ever get a problem with your code.

264
00:16:32,400 --> 00:16:33,990
So this is really for your benefit.

265
00:16:34,020 --> 00:16:38,550
So in case you ever have any issues all you need to do is actually our environment and Brunner's that

266
00:16:38,610 --> 00:16:41,450
postscripts correctly and it's guaranteed to work.

267
00:16:41,460 --> 00:16:45,660
So let's get started and actually show you how you can create an environment and set up the requirements

268
00:16:46,020 --> 00:16:46,530
to do this.

269
00:16:46,530 --> 00:16:50,220
You're going to need to go to either your terminal or command prompt depending on what your operating

270
00:16:50,220 --> 00:16:50,950
system is.

271
00:16:51,030 --> 00:16:53,390
I'm on Windows so I'll go to my command prompt.

272
00:16:53,700 --> 00:16:57,930
So what I need to do is CD into Downloads.

273
00:16:58,760 --> 00:17:03,910
And then I'm going to change directory into flask boot camp and in my case because of the way I unzip

274
00:17:03,950 --> 00:17:06,520
it I need to C.D one more time.

275
00:17:06,530 --> 00:17:11,660
It's a flask boot camp and remember it should always be checking this against the file path where you

276
00:17:11,660 --> 00:17:19,250
just saw in your Windows Explorer or your finder on Mac OS and then we're going to do here is confirm

277
00:17:19,460 --> 00:17:25,070
that our requirements that txt file is there so I'm going to type D I ArcSight on Windows and Mac OS

278
00:17:25,100 --> 00:17:26,750
or Linux type ls.

279
00:17:26,900 --> 00:17:32,390
And when you do this you should see a list of all those folders we are just talking about as well as

280
00:17:32,390 --> 00:17:34,610
the requirements that txt file.

281
00:17:34,610 --> 00:17:38,870
Now that I know I'm in the right location it's time to create my environment.

282
00:17:38,920 --> 00:17:47,720
I do this at the command line by typing Konda create dash and and then whatever the name of the environment

283
00:17:47,810 --> 00:17:52,700
I want keep in mind if you already have existing environments this name needs to be unique.

284
00:17:52,970 --> 00:18:03,230
So I will call this my new flask envy and then I'm going to say space Python and I'm going to set Python

285
00:18:03,260 --> 00:18:08,140
equal to 3.6 or the time of this recording Python 3.7 is not released yet.

286
00:18:08,360 --> 00:18:14,670
So we're just going to use 3.6 will hit enter and what's going to happen is condescension going to ask

287
00:18:14,670 --> 00:18:18,380
you hey you want me to set up these new packages for Python 3.6.

288
00:18:18,390 --> 00:18:19,740
In this environment.

289
00:18:19,740 --> 00:18:24,220
So I type wife yes I enter and then it's going to set everything up for me.

290
00:18:24,270 --> 00:18:26,490
Ok this may take a little bit of time.

291
00:18:26,550 --> 00:18:29,970
A couple of minutes at most and we're going to fast forward in time until this is done.

292
00:18:29,970 --> 00:18:33,770
All right so all of that just finished installing I've gone forward in time.

293
00:18:33,870 --> 00:18:37,860
And then once it's all done installing we should be able to activate our environment.

294
00:18:38,070 --> 00:18:46,120
If you're on a Mac OS or Linux you're going to type out source activate and then the name of your environment.

295
00:18:46,330 --> 00:18:50,330
If you're on Windows and you're using the command prompt you don't need to type out source.

296
00:18:50,350 --> 00:18:52,440
You just need to type out the word activate.

297
00:18:52,510 --> 00:18:55,430
It was my new flask.

298
00:18:55,520 --> 00:19:01,750
And we went to enter and if you successfully activate in your environment they should be able to see

299
00:19:01,750 --> 00:19:06,850
in sees some indication saying hey right now you're working inside your environment.

300
00:19:06,850 --> 00:19:07,680
Perfect.

301
00:19:07,690 --> 00:19:13,030
Now what I want to do is install all the libraries in the requirements that text file into my new environment

302
00:19:13,480 --> 00:19:24,910
the way I can do this quite easily is by saying Pip install dash are and then requirements dot text

303
00:19:25,240 --> 00:19:30,640
make sure you're able to autocomplete by just hitting tab requirements that text if you're not able

304
00:19:30,640 --> 00:19:35,530
to tap autocomplete that it means you're in the wrong directory or your requirements are text file isn't

305
00:19:35,530 --> 00:19:36,590
in that directory.

306
00:19:36,610 --> 00:19:39,140
So when you change directory until you're in the correct one.

307
00:19:39,280 --> 00:19:45,840
So then enter and this is going to automatically install all the flask libraries we use in this course.

308
00:19:45,840 --> 00:19:46,820
Pretty sweet huh.

309
00:19:47,180 --> 00:19:49,480
OK let's forward in time until it's ready to go.

310
00:19:49,650 --> 00:19:54,870
Once it's done installing all those libraries you can test it out quickly by just typing up Python.

311
00:19:54,870 --> 00:19:56,750
Hitting enter and then type out.

312
00:19:56,820 --> 00:19:58,650
Import flask.

313
00:19:58,830 --> 00:19:59,570
Hit enter.

314
00:19:59,610 --> 00:20:04,110
And if you don't get any error that means flask was successfully installed using the requirements saw

315
00:20:04,110 --> 00:20:05,940
text file and you're good to go.

316
00:20:06,240 --> 00:20:06,850
All right.

317
00:20:07,020 --> 00:20:11,640
We finished setting up everything and now we're ready to go and continue on the course.

318
00:20:11,640 --> 00:20:15,810
If you got stuck on any of these parts please make sure you review the video carefully and if you're

319
00:20:15,810 --> 00:20:20,580
still confused and you can't find your solution on stack overflow then just post the Kewaunee forums

320
00:20:20,610 --> 00:20:22,090
and we're happy to help you out there.

321
00:20:22,230 --> 00:20:26,160
Make sure you also do a search in the Kewney forums because it's very likely the other students have

322
00:20:26,160 --> 00:20:29,540
already probably asked and have answered similar questions.

323
00:20:29,610 --> 00:20:31,310
Thanks and we'll see you at the next lecture.
