Well.
Hi there, this is time for PC people to get set up.
So all you Mac people out there, you don't need to be watching this one.
And now's the time when I tell you guys that I told the Mac people that they were my favorite people
because I'm a mac user myself, but you know, I am a mac user.
But I'll have you know that I started out in PCs.
I in fact worked for IBM for a few years.
So really, in my heart of hearts, I'm from a IBM from PC blood.
So.
So you guys are really my people no matter what I said to the other people.
Anyways, let's get you set up with a PC to use the environment that we need for this entire course.
So we start by going to the repository, my repository for this class, LM engineering, which is at
github.com slash my name LM engineering.
This link should be all over the place in the course and in the in the notes for the course and resources
and so on.
And when you go there, you see this repository on GitHub.
And if you scroll down you get to see the Readme file that I've written with setup instructions, and
I hope I've done a decent job in laying out all of the steps required to set up your environment.
And if you prefer to follow instructions that way, then do it that way rather than watching the video.
And hopefully I've done it well.
And if you find a problem with them, please, please let me know so I can update them for everybody
else.
Anyway, if you do go through these instructions, what you'll find is that the first thing it says
is that for PC people, you may need to install git.
If you've not done it before.
Git the code control system, something that I imagine most of you who have used some might not.
It comes installed on Macs by default, but not on windows.
And so if you follow this link, you get to the git download page, you follow the instructions to download,
and you then have to say okay about 20 times and just accept the defaults for everything.
I just went through and did this myself when I was pressing.
Okay, okay, okay, so go through all of those things, just take the defaults all the way through
and you will install git on your computer.
And so once you have done that come back to the repository.
The next thing to do is at the top here there's this green button code.
And if you press that green button, it comes up here with the link to the repository.
And you can pick either of these.
But we were going to pick this https one.
And we're going to press um actually you should pick this one and then press the copy button to copy
it to clipboard.
What we're now going to do is we're going to go and open a new PowerShell.
Uh, let me see.
Type PowerShell in here.
I'm a little bit clumsy at the PC because it has been a little while since I've done this, so you may
have to bear with me if I make a fool of myself.
But there we go.
Up comes the PowerShell.
Um.
And now the first thing you need to do, which you may already have, is create a projects directory,
something that where your different projects that you work on will go.
You may already have a projects directory, but if I do CD projects, it turns out I do not.
So I can make a projects directory by doing this.
You may also just use the Windows Explorer.
Uh, the the File Explorer if you prefer.
You don't need to use the command prompt, but, uh, is he doing that?
So I've made a new projects directory in my home directory.
I'm now going to CD into it, and here we are in our projects directory, which of course is empty or
dir, if you prefer, the windows way.
Uh, what I now type is very simple.
Uh, it is git clone, uh, which means I want to make a local copy of this repository, and then you
put in the name of the repository, the link to it that we copied a second ago.
Uh, and when we do that, it will immediately download.
It's already happened.
All the code has been cloned to my local drive.
So if I look here, you'll see that there is indeed a folder called LM engineering that we will now
go into.
And there is all of the code that will be our playground for the next eight weeks.
And now it's worth mentioning that sometimes people use the expression the project root directory to
mean this folder LM engineering.
It is the root directory of this project.
So if I ever say verbally, or if it's in the in the readme that it mentions project root.
I'm talking about this directory LM engineering.
There we are.
So the next step is now to install Anaconda, which is as I say, it's a it's a reasonably heavyweight
tool because it's super powerful.
And the place to do that is back in the the Readme again, there is a link to where you go to install
Anaconda and there it is.
And I have that up over here.
Um, except the cookies.
This is the Anaconda documentation for installing on windows, and it tries to get you to give your
email address and various other things which you can feel free to do if you wish.
But then at the end, you can also just say what we'll do now press the download.
It suggests you could you could provide an email, but you can also just say skip registration here
if you'd prefer.
And then you get to this Download Now page.
And this is the download that we will do now.
Anaconda is quite large.
This is a five gigabyte download.
And so it may be something which you don't have the room for.
And you may also find that this is too heavy weight.
And there is the alternative approach using virtualenv that I will record after this, which is a simpler
approach, but it's less guaranteed to be compatible.
And, you know, it's less hardcore.
If you want to be a hardcore LM engineer, you should at least try the Anaconda route.
So you press the download button, which I already did.
It then brings up a screen to install Anaconda, the usual installation wizard thing, and you have
to press yes a few times.
It does prompt you for where you want it to install.
Some people have selected there to install it to a different drive to make sure that you have capacity.
Um, and then when that is done, it will complete the installation, take a few minutes to download
and install, and you will have the Anaconda program on your computer.
And what does that mean?
Well, the thing that it means, as far as we're concerned is that whilst we have this PowerShell that
we are very familiar with, there is also a new thing on our start menu, which is called Anaconda PowerShell
and that if we open it looks very similar, looks just like a normal PowerShell, but it is in fact
a special Anaconda one.
Try and expand this window for you.
Hold on a second while I fumble fumble, fumble.
Uh uh.
Now what have I done?
There we go.
I'm hopeless at this.
There we go.
So the way that you know that it's an Anaconda PowerShell is that this word base appears to the left,
which means that we are in a world, uh, a base world, rather than in a world that we have built,
especially for an environment.
All right.
So now I'm going to go into our projects folder that we just made, and I'm going to go into LM engineering.
There it is.
So we're now in the project root directory as I explained is the right term for it.
And I'm now going to run a simple command which is conda which is the name for running anaconda commands.
Env which means environment create.
I want to create a new environment minus f means I'm going to specify a file which describes exactly
everything that I need for this environment.
And the file is called Environment.
Environment.
Dot YAML.
And you can see Environment.yml right right here.
So that is what I'm going to do.
Now at this point you will need to go and get a coffee and maybe even two coffees.
So it does take a bit of time to install this full environment the first time.
So when I do it, it's probably takes a few minutes because I've done it before.
The very first time, it might take somewhere between 10 minutes and 20 minutes depending on your internet
connection, and that's going to be a thing to look out for.
So what it's actually doing.
So it's looking at all of the packages that we say that we need for this data science environment.
And it then figures out for this particular type of system, whatever chip you've got and for the various
configurations that you've got, what are the compatible versions of every single package that we need
to do things like in the future we'll have an object database, we'll be using Lang chain, we'll be
using gradio all sorts of things.
It makes sure that we pick the latest versions that are all compatible with each other and also compatible
with your processor and so on.
And that's why it now says solving environment.
That's the equation that it's solving with lots of different decisions to make.
So it's going to make those decisions.
And it's then going to install all of those packages on your computer.
And we're going to I'm going to keep keep going with this sentence for a bit longer to see if it's going
to get close to wrapping up.
Otherwise I might have to, uh, to to break and come back in just a second.
All right.
It looks like it's going to take just a couple more minutes.
So I'm going to pause the video and I will return when this is ready.
Well it's just as well I didn't hang on in there.
It took another five minutes from that point to finish.
So that would've been an embarrassing amount of five minutes of my waffle that I've rescued you from.
So anyway, this can take a few minutes and I've got a fast connection, as I say, so.
So it could well be 20 30 minutes for you.
So hang on in there.
But but obviously if it takes unspeakably long, then abandon and go to the next video where we will
do it differently.
But if it's completed, your your Anaconda PowerShell prompt should look something like this.
It still says base at the end there.
And we've created an environment that is known.
It's called LMS.
That's the name I gave it.
And to now activate that environment, which means to make that be the live world that that Anaconda
is working within.
You simply type conda, activate LMS and you'll need to run that.
You'll need to any time that you come back to your computer that you want to start everything again
before you you get started, you will need to remember to open up an anaconda prompt and do conda.
Activate LMS and your clue that it is now working is that you'll see LMS written over here on the left
to the left of my prompt, and that is telling me that I have successfully created my Anaconda environment.
Um, and another way we can do it is that if we type Python minus minus version, it will tell us that
the version of Python we're on is 3.11.1, which is the version, or at least 3.11 is what I specified
for this environment.
So we know that we're on exactly the same version of Python, and everything should be compatible.
And it just remains for me to type these two words Jupyter Lab.
And this is going to open up the Jupyter environment, which is this data science environment where
we can work really effectively together on code.
Again, some of you probably know this back to front.
For some people this might be new.
I press enter.
It's going to start Jupyter Lab.
Uh, up it comes.
The first time it might prompt you for which browser do you want to open, but then it opens up with
Jupyter Lab on my computer with our eight weeks that lies ahead of us and we are good to go.
That is the PC instructions.
Hopefully this has all gone well for you.
If it hasn't, please, please reach out to me, let me know and I will get you sorted.
I will see you then for the next video.