Well, if you're a PC person, then you've come to the right place.
This is for you.
If you're not a PC person, then get out.
You're not welcome here.
All right, with that out of the way.
Hello.
This is the video.
When we actually get to set up your environment and there are going to be five steps to doing this.
The sixth one will be somewhat optional.
There will be a sixth step, but the five main steps we are going to do, and they are going to be covered
in my repo very clearly.
And let's start by going there.
We're going to go to the repo that is linked in the course materials.
It's at GitHub.
And here it is.
And when you go there you see the different directories, the different folder structure that we have.
And if you scroll down you get what's known as the readme, the set of information that comes with the
course.
And I ask you, I plead with you to read the readme.
I put a lot of care into the readme.
It's got lots of great stuff in there, and so do take a look through it and it will set you up to be
successful in addition to another link to my LinkedIn.
I'm starting to sound a bit desperate about this.
There's also lots of useful things, and most importantly, there's links to the setup instructions,
the windows setup instructions, the Mac and the Linux ones.
And I'm not going to take you through them right now because this will be a living, breathing document
that I will keep it updated as people hit problems.
But you should go through that and have that side by side, if anything, that's going to be better
than this video.
See this video as being bringing it to life.
But the instructions will be bulletproof.
So it's time for step one and just before starting step one, I do want to draw your attention to a
section at the top of the setup PC guide.
That's called gotchas, and it has a few of the common traps that can happen when setting things up
for PCs.
One of them is an insidious problem, with windows sometimes being set up to not allow names of files
longer than 260 characters.
And if that is set on your system, then you need to to unset it so you are allowed longer filenames.
And that's something which there are instructions for how to do that.
Another common trap is around antivirus software that can interfere with the installation.
So there's some steps there as well.
So please do look at those gotchas because they will set you on a good path.
All right.
Step one is about cloning the repo using git.
And to get started, if you go to the start menu and you then type PowerShell, you should be able to
open up a PowerShell.
One of these things.
Let me get rid of the other one that's running here.
So here is a PowerShell.
And this is like like for for running commands in the command line.
If you're new to this, one of the guides in the guide folder in the repo contains within it.
So in this guides folder there is a guide for using the command prompt that will put you in good shape.
But I'm imagining at this point you are familiar.
So you know that that there could be a projects directory.
Most people have created a projects directory in which you should go into it.
If you don't already have a projects directory, then you should create one with mkdir projects within
your home directory.
So you will then have, like I do, a projects directory within your home directory.
And if I look at the contents of it, it has my LM engineering folder from my other course, and it
has some test folder.
And it is this folder that we're going to clone our new repo.
First we need to check that we have git installed git for code management.
And you can do that by typing git minus minus version.
And we'll see that I do indeed have git installed.
If you don't have git installed and that has an error message, then you can go to Git's website and
there's a link in the setup instructions and go to downloads and to windows.
And you can click here to download the latest version for windows.
And the installation instructions should be crystal clear and make sure that you have that in there.
You might need to open up a fresh PowerShell.
Always worth knowing that you might need to do that and sometimes you need to restart your computer.
Super annoying, but hopefully not.
You should be able to type git minus minus version and see git in there.
Okay, so the next thing to do is to actually clone the repo.
Okay.
So we go to the repo itself.
Here we have it.
And uh the first thing we do is we go to this green button on the top right of the repo, as I'm looking
at it here in a browser, and you click this code button.
You select Https and you'll see the web address of this repo.
And you press the copy URL to the clipboard button.
And there we go.
I have copied it.
And now you come here to the PowerShell.
Now again I'm in my projects directory.
So you're in the your home directory then your project subdirectory.
If your C drive is quite full then you might want to do this on your D drive.
Just make sure you're within a project's directory.
A good place for it to be.
And you simply type git clone and then the paste in there the web address of the GitHub repo.
And when we press enter that runs it does its thing and it's done.
And if I look at that directory you'll now see that agents is there.
I can now go into that directory agents and look at it.
And here are all of the directories within the repo.
And this folder that we're in right now which is projects agents.
This is what sometimes known as the project root directory.
It's what people call this.
And it's a very common place to go.
And this is where we are.
And that means that we have completed step one of the five step process.
Okay.
So we go right away to cursor to look at the cursor IDE, a fabulous platform, and download it and
install it if you don't already have it, and you can just press the download for windows button.
It will download the executable and you can then run it and you'll get this setup screen.
A familiar kind of setup.
Accept the agreement, choose where you want it to install it, and I choose the C drive, but you could
put it on the D drive if you're running out of space.
And then next and then we will create a desktop icon and add it to Windows Explorer.
And note that it will make changes to path, which means that we will need to bring up a new command
prompt for this to take effect.
And then we will install that.
So it will now install cursor on my PC so that we can use this platform.
And I will jump forwards and see you in a second.
And cursor has now installed.
And so I can press finish.
And it should now be installed and launching on my PC.
There we go.
It's right here.
The, uh.
Oh, no, it is starting.
It is starting.
Here it comes.
It just took a moment.
And we can just keep with all of these basics.
And I'm going to select to use the word cursor if I want to run it from the command line and say yes
okay.
And then continue.
And I'm going to have it in privacy mode, I'm not going to, to uh, be logging what I do.
And you are all set.
So now you can sign up for a cursor account, which is free, and you just press that sign up button
and follow the process.
And uh, then, uh, once you're finished with that, I will see you back here in a second to actually
use cursor.
And so here we are in cursor.
It started I've signed in, I've actually got a pro trial.
And we're looking at the first screen we've got here.
And I can press Open Project.
And what I can now do is navigate I'm going to I'm going to actually go this PC and then to my C drive
and then to users and add and then projects, which is where my projects are.
And here is agents.
And this you'll recognize as the directories that we cloned from our repo.
And what I can do now is just press this select folder button which is saying I want this agents folder
to be my project root folder.
And it opens up.
This is your first look inside cursor.
We've got our directories down here.
You've got like a welcome screen up here I'm going to X out the welcome screen.
And now here we have something called the explorer on the left which has all of our directories.
We've got a chat ability to chat with an LM on the right.
I'm also just going to close that down.
And what we're looking at here is the code.
And in fact I can this navigator on the left is showing you a different directory for each of the six
weeks of the course from foundations through to MCP.
And if we open this swizzle here, you'll see all of the contents of the first week foundations where
we are right now.
Okay.
We're racing ahead to part three of the setup.
Part three of course is time for UV, which I'm so excited to to show you.
So we start by just looking for, uh, UV package manager.
You will, uh, find it's also linked in the setup instructions.
Astral is the name of the company that makes UV.
Here it is.
And it is an extremely fast package manager as it tells you.
So to install for windows, you simply run this in a PowerShell.
And so I've pressed on windows I'm now going to press this copy button to copy that in.
And I'm now going to go to a PowerShell which we will do right here PowerShell.
And I'm going to run that command.
So here we go.
We'll let it do its thing.
It's now installing UV.
And that appears to have already happened.
And it's telling you you can either restart your shell to to take this into the path or you can run
those commands.
We're going to restart our shell.
If we type exit to get rid of that shell.
And we start a new shell and you must remember to do this, otherwise it won't work.
So PowerShell again.
And now we should we should have access to UV.
And so we can type UV minus minus version.
And there we have UV installed on the machine.
Now I'm going to show you this next part within cursor.
Here is cursor I actually quit cursor and reopened it again for the same reason that we did that with
a PowerShell to to reset the path variables and within cursor, I'm going to go to the view menu and
choose terminal.
It's also control and the Backtick to bring up a new PowerShell within then cursor, which is a useful
thing to do.
And that's how we'll do it, mostly on this course and within here.
If I do a dir you'll see, or an LHS, you'll see that the contents of that directory, I'm now just
simply going to do the command UV sync, which is my way of telling UV that I want to build an environment
consistent with what I have in this directory.
And I do that.
And what we're seeing now is it's building the environment, and it's actually beginning by installing
Python, a dedicated version of Python 3.1, which is the version for this project, and it's now installing
the packages.
Now, people who are familiar with Anaconda know that this process of building a full specked, isolated
environment with the right version of Python is something that can take up to an hour, and sometimes
on some systems, it was taking an hour and a half to build this environment on their computers.
What you'll find is that it's a different story.
With UV, it's running remarkably quickly, and I'm hoping it's going to finish by the time I finish
this sentence.
But if not, then I may put you on pause and come right back again, because it literally takes a minute
or two and it will be done.
So I'll see you in a minute.
Okay, so it did take about another three minutes, but I didn't lie.
It's quick.
It's very quick and it's very impressive.
And the big news is that that's it.
There isn't any more of the kind of configuration management part those packages have been installed.
If I look in this directory, you'll see that there is in fact going to be a new folder.
Venv.
It's created a virtual environment for people that know about Python virtual environments.
It's built one and that now exists in this folder, and that's all there is to it.
And going forwards, if we want to run a Python script, whereas you might normally type like Python
and then the name of a Python script you now would type, you've run and then the name of the script
and it will automatically run it in that environment.
And everything else is the same.
The.
The environment is built.
It's as simple as that.
We're pretty much good to go and we're now in the end game.
We're at step four of the instructions and it's smooth sailing from here.
The next step is to set up a key with OpenAI so that you can use OpenAI directly.
If you already have a key, you can just skip this step if you don't want to be spending money on OpenAI.
There are alternatives.
As I say, you will find them in the setup instructions and the readme and in the linked in the guides.
So please do follow those instructions.
But I do assume that most people are okay to spend a few dollars and is quite cheap on using OpenAI,
because the power of these frontier models is going to allow us to do great things.
And of course, you can use Deep Seek or Google's Gemini or Grok as a straight replacement for any of
these.
Okay, so I go to a browser and I go to platform.
Which is where you get into the sort of API side of OpenAI.
And the first thing that you may need to do is sign up.
I have already got an account so I can just log in, but you may need to come in and sign up.
If I log in, I can come in with my Google credentials.
And here I am logged in as me to the OpenAI developer platform.
Now, there are now two things that you need to do.
One of them is about setting up billing, and one of them is getting an API key.
And we'll do them both now.
Okay.
And so in order to set up your billing, you go to the settings menu up here.
And then you go down to billing right here.
And this is where you choose to put in a credit balance.
You can see I've got quite a large credit balance.
I seem to spend quite a lot of money on different projects with OpenAI, but this course will only cost
you a few dollars.
But the way that it works is that you do need to put in an amount up front, and $5 as of today is their
minimum.
So you'll need to put in that $5 and then you spend against it.
For people internationally, I know that sometimes OpenAI can be a bore about charging because they
charge in dollars and some credit cards don't accept an international charge like that.
So there is some some nonsense to get around with that.
And as I say, there's alternatives like deep seek if you want it.
Some students use grok with a Q, which there's also a great option.
And you can also use something called open router that's quite popular, particularly with international
people, students, because you can set up an open router account and it will route through to the different
models.
So these are all different approaches for you.
And they work almost exactly the same way.
There'll be some sort of billing page like this where you get to choose to top up and you press add
to credit balance to top up with a credit card, and you put in the minimum $5.
We won't need any more than that for sure.
Okay.
And so once you've done that, you then have to go to the API keys section.
And this is super important.
And this is where you get to set keys.
That will be the how you will access this API from your computer.
And the way that you'll do that is you'll press create new secret key.
You'll put in the any name you want.
You can call it just to remember it.
In the future.
Make sure that you select project.
You have default project so it's for everything.
Have all permissions and then press Create Secret Key and you will get a new key.
And you can copy it into your clipboard.
And you have to do that to make sure that you preserve it.
Because we're about to make use of that API key.
Now here's a pro tip to be really careful about.
When you copy that key into the clipboard, you might be tempted to paste it into another application
like a notepad that you will then copy and paste it somewhere else.
But there's a there's a trap there.
Sometimes these kinds of word processors, when you paste in the key, they'll they'll mess around with
it in some way.
They'll replace hyphens with long hyphens because they look better in text, and they may replace some
characters with international characters that are right for your locale.
And if they do that, your key won't work, and it's going to take you ages to figure out what's happened.
So be careful of that.
Don't do that.
I suggest copying it to the clipboard and then immediately doing the next step we're going to do, which
is actually using it in our project.
So keep that trap in mind if you do want to paste it somewhere to keep it for your records, then be
careful to paste it into a kind of tool that's not going to mess around with the API key.
All right, I hope that makes sense.
I hope you've now created your API key.
If you don't have one already and you've got it and you've got it nice and safe, and you've recorded
it somewhere where it's not messing with the characters, and we're ready to put this to good use.
And this is it.
We've reached the final step, the final step of setting up.
Thank goodness we're back in cursor.
And I've actually I pressed X on the PowerShell that was here.
So we've got a nice clean screen here on the left.
This is the explorer I've collapsed all of these so that you just see the top level explorer.
And what I'm now going to do is right click here and say new file.
And I've now got a new file I'm creating at the top level.
Make sure that it's at that top level.
And I'm going to call it something very specific.
And you have to call this file exactly the same thing.
And that thing begins with a dot, a period.
A full stop, as we say in England.
And then the letters E and N and V.
So it's called dot EMV, and it has to be called exactly that for a very particular reason that we'll
get to later.
But as long as you've called it Dot and nothing else, then you're in great shape.
So that is the name of this file.
A dot EMV file is a common way that people put in environment variables that they want to set just for
the purpose of this project, and they will be environment variables that will contain what we sometimes
call secrets or things that we don't want to to be public.
We don't want it to be checked into source code.
We want it to be something that is just for us, kept private, that we will use, and we can just put
things in this file of the form of like a key name equals and a value, and that will become an environment
variable, as you will see.
And in particular, there's one key that we really care about.
And you have to do this exactly right.
If you make a typo in this, then it's not going to work and it's going to be really frustrating.
So try to be really careful with this.
I'm going to type open and you can see that already the cursor is already it knows what I want to do.
See how it's filling it in for me.
I could just press Tab to do what it wants, but I'm not going to press tab.
You will see because it's got a dummy key in there, not the key that we want.
Open AI underscore API underscore key equals.
And you can see it's prompting me there ESC dash dash and a number.
Now what I want to put in here is something that will indeed start ESC Pro.
And it will have a number.
But it's going to be a long number.
And it's going to be the thing that I just copied into my clipboard from the previous screen from open
AI.
You need to now paste that key right here and it's got to look just right.
It's got to start ESC and then be followed by that that long long number and letters.
And it's got to have those hyphens in them just as they are.
And this is of the people that struggle with environment setup.
Most of the problems end up just being this one tiny step.
So please get it right.
Uh, so hopefully you've done that and you've put that in there and it's got a key in there.
Now, if you're using other platforms like Deep Seek, then this is exactly what you will do.
The same thing you'll just put in here deep seek and it will.
There we go.
It fills it in for me.
Deep seek API key equals.
And you might have something else.
You might be using grok the inference platform or open router or any of the others.
Any keys that you've got, you simply put them in here like that and we will use them later.
So with any luck, you've put in OpenAI API key equals and it's got your real key in there, which means
that the setup is complete.
Many congratulations.
That's the painful part over as long as it all works and we'll find out, please skip the next video,
which is going to be for the Mac people, the next lecture, and then we will reconvene after that.
And I'm so excited to get started.