1
00:00:01,670 --> 00:00:05,690
OK, in this video, we're going to create a directory to hold all the files we're going to be creating

2
00:00:05,690 --> 00:00:08,880
throughout this course, and we'll also spin up a virtual environment.

3
00:00:08,900 --> 00:00:10,850
I'll tell you what that's all about as well.

4
00:00:10,860 --> 00:00:12,440
So open up your get back terminal.

5
00:00:12,830 --> 00:00:15,070
And again, this will say something different.

6
00:00:15,080 --> 00:00:15,890
No big deal.

7
00:00:16,160 --> 00:00:18,140
Whatever it says, there doesn't matter at all.

8
00:00:18,350 --> 00:00:22,820
The first thing we need to do is create a directory where we want to save all of our files going forward

9
00:00:22,820 --> 00:00:23,350
in the course.

10
00:00:23,660 --> 00:00:30,140
So to do that, you type in Mark Dya stands for Make Directory and you can put this anywhere.

11
00:00:30,140 --> 00:00:35,960
I want to put it in my C drive and let's call this, I don't know, goosies graphical user interfaces.

12
00:00:36,320 --> 00:00:37,640
I don't know, call it anything you want.

13
00:00:37,970 --> 00:00:41,240
I go and click that now we need to move into that directory.

14
00:00:41,450 --> 00:00:47,450
So we use the CD command that stands for Change Directory and then just type in whatever that was that

15
00:00:47,450 --> 00:00:48,230
you just created.

16
00:00:48,530 --> 00:00:49,640
And you'll see right here.

17
00:00:50,540 --> 00:00:51,170
There it is.

18
00:00:51,650 --> 00:00:54,680
And we can type in the command to show us where we are.

19
00:00:54,680 --> 00:01:00,380
And sure enough, we're in the c e directory for you type that ls command to list the stuff in this

20
00:01:00,380 --> 00:01:00,800
directory.

21
00:01:00,800 --> 00:01:05,240
And there's nothing listed because there's we haven't created a created anything yet and we're going

22
00:01:05,250 --> 00:01:05,570
to go.

23
00:01:05,590 --> 00:01:07,280
So go ahead and clear the screen now.

24
00:01:07,550 --> 00:01:09,140
I'm going to create a virtual environment.

25
00:01:09,350 --> 00:01:11,430
You don't strictly speaking, have to do this.

26
00:01:11,430 --> 00:01:13,400
So if you want to skip this step, you can.

27
00:01:13,760 --> 00:01:19,100
But any time I'm coding anything in Python, I like to create a virtual environment in a virtual environment

28
00:01:19,100 --> 00:01:20,720
is like a little walled garden.

29
00:01:20,960 --> 00:01:26,720
It allows us to do stuff inside the virtual environment that then doesn't affect the rest of our computer

30
00:01:26,720 --> 00:01:32,330
so we can install different modules and different versions of things inside our virtual environment

31
00:01:32,780 --> 00:01:35,690
and then it doesn't affect the rest of the computer.

32
00:01:35,690 --> 00:01:43,160
So if, for instance, we need to download and install a certain version of a module or something,

33
00:01:43,280 --> 00:01:47,240
we can do that inside the virtual environment, even though we might have a different version of that

34
00:01:47,240 --> 00:01:49,130
thing installed somewhere else on our computer.

35
00:01:49,130 --> 00:01:52,970
So it's just a sort of a best practice when it comes to programming in Python.

36
00:01:52,970 --> 00:01:53,840
So I always do it.

37
00:01:54,800 --> 00:01:59,270
We're not going to be installing a lot of things with it throughout this course, maybe one or two little

38
00:01:59,270 --> 00:02:00,260
things here and there.

39
00:02:00,770 --> 00:02:03,440
So it's not super important, but we just do it.

40
00:02:03,440 --> 00:02:04,880
It takes a second, so we might as well.

41
00:02:04,880 --> 00:02:11,600
So to do this, we just type in Python, dash em and then V N.V. we're going to create a virtual environment.

42
00:02:11,600 --> 00:02:13,640
V and V stands for virtual environment.

43
00:02:13,880 --> 00:02:17,450
And now we just want to name this and I'm just going to call it Virt for Virtual.

44
00:02:18,080 --> 00:02:20,210
And it takes a second to spin this up.

45
00:02:21,380 --> 00:02:24,300
And install some files and boom, it's done.

46
00:02:24,320 --> 00:02:29,270
Now, if we type the command to list the stuff in this directory, we see there's this new virt directory

47
00:02:29,480 --> 00:02:33,470
and inside it there, there's all kinds of stuff that will create a virtual environment for us.

48
00:02:33,480 --> 00:02:35,210
So we've got all the things we need now.

49
00:02:35,210 --> 00:02:36,440
We just need to turn it on.

50
00:02:36,650 --> 00:02:43,460
And to do that, we type in source and then virt and then scripts capital s and then activate.

51
00:02:43,730 --> 00:02:49,340
And when we do, you'll notice this virt in parentheses above our command prompt.

52
00:02:49,700 --> 00:02:52,330
That means our virtual environment has been turned on.

53
00:02:52,670 --> 00:02:55,640
So now we can do stuff in this directory.

54
00:02:56,570 --> 00:02:59,610
And install different things if we want to.

55
00:02:59,630 --> 00:03:02,750
There's nothing we need to install right now, but that's cool.

56
00:03:02,750 --> 00:03:07,280
So so if you want to turn off your virtual environment, you can type the command deactivate.

57
00:03:08,840 --> 00:03:15,170
Like that, and then you see now there's no little overt thing above our command terminal or command

58
00:03:15,170 --> 00:03:16,940
prompt there, so I mean, it's been turned off.

59
00:03:17,120 --> 00:03:18,010
So let's turn it back on.

60
00:03:18,020 --> 00:03:21,050
I'm just going to hit my up arrow a few times to kind of.

61
00:03:21,940 --> 00:03:27,970
Cycle through my last commands, and again, there's the command source, virt scripts activate and

62
00:03:27,970 --> 00:03:30,600
boom, now our little thing has has been turned on.

63
00:03:30,610 --> 00:03:36,100
Now, if you're on a Mac or a Linux, I think the command to start your virtual environment is source

64
00:03:36,250 --> 00:03:37,630
Behn activate.

65
00:03:40,250 --> 00:03:45,110
I'm pretty sure if that doesn't work, you just have to Google, you know, Vermaak and it'll show you,

66
00:03:45,110 --> 00:03:47,890
but I'm like ninety five percent positive.

67
00:03:47,900 --> 00:03:50,960
That's the command to turn on your virtual environment for Mac or Linux.

68
00:03:51,290 --> 00:03:52,570
OK, so now we're ready to go.

69
00:03:52,580 --> 00:03:53,900
We've got everything installed.

70
00:03:54,110 --> 00:03:59,930
We've got our little directory created and the only thing left to do now is to start to create our first

71
00:03:59,930 --> 00:04:00,920
counter project.

72
00:04:01,190 --> 00:04:01,650
So.

73
00:04:01,650 --> 00:04:03,290
Well, I think we'll do that in the next video.
