Hey welcome back.
This is the video where we finally get into telling Python for Windows.
So just to be clear we have a Mac or anything that isn't a PC.
This video is not for you.
I mean you're welcome here.
Can't kick you out but you're going to see some conflicting information.
So installing Python is actually really really straightforward compared to when I have to show students
how to install something like Ruby which can be a huge pain especially on Windows machines.
Python however is really straightforward to install.
It's just that in order to execute it to run scripts you do need to know some of the basic command line
commands that we talked about earlier in the course.
So that's that's kind of the tradeoff.
It's easy to install takes just a couple of seconds.
It's basically a click.
But we have to know how to execute it.
And before we go any further the end goal is that we want to be able to type python in our power show.
So I'm inside power show.
If you did skip the section because I know some people just want to go straight into installing make
sure that you know how to open up power show or you have to do a search for it on your computer if you
have Windows 7 or greater.
It should be there.
So I want to be able to type python and get a version greater than three point six point four or three
point six when four are higher which shouldn't be a problem once we install it.
But if you've never installed Python This should not work.
It should give you a bunch of read text as if I had typed that it should say the term Python is not
recognized.
So to get that command all we have to do is go to Python dot org.
And download it.
So we go to downloads and then this is important.
We want download for Windows which it should automatically suggests that you have Windows.
But then you want to make sure you're clicking Python 3 point X not two point seventy three point x.
Click that and then run it will take a moment.
I will fast forward through this and it's really important that you click the button or the checkbox
that says add Python to path.
So make sure you have that checked before you finish the install and then go ahead and complete the
installation.
It will take a moment and when it's done.
Open a power shell again make sure that you're not trying this.
If you were following along and you tried to run Python in power shell before you installed you're going
to need to make a new window or quit out of power shell and reopen it basically restart the process
because it's not aware that pythoness now a thing but after you do that you should be able to type python
and then this takes us to what's known as the Python interpreter.
It's a REPL R E P L stands for read evaluate print loop which is what it does it will read the code
in that I type well evaluate it print it back to me and the result.
And it keeps going loops.
So this is not where we'll actually be developing applications.
We're not going to type an entire you know Web site or you're not going to analyze some data from a
CACP file in here but it's a quick way to test things out.
So for example try typing something that is jibberish that isn't Python.
It tries to run.
DK JDA just as Python code and it tells me it's an error.
We'll talk a lot more about all of this.
But Jeff is not defined.
If you tried to type something that is python which really briefly one plus one it reads this and it
evaluates it which is to it print it and then it loops and it waits for me to do something else.
Now I'm going to do one plus two.
And that's also as far as Python is concerned.
This video is about installing it not about the actual language or syntax but just make sure that you're
able to do this make sure that you can type python in your power show and that the prompt changes to
this.
And then you can type whatever you want in here.
It's not the focus and the last thing I need to mention is how you get out of here because this is not
your normal prompt in the power show.
I don't see this path here that tells me where I am to get out of here.
I can type quit with parentheses or I just type quite like this.
It tells me use Quit with friends or controls the plus return whichever is easier for you.
Control-C and return which I think I don't know if that's on Mac as well.
I usually just type quit just like that and we're out of there now and I'm back in power so I can open
it back up by typing Python and then quit.
So we'll be doing this quite a bit especially early in the course.
The REPL the Python interpreter is a really easy way of writing code and seeing what happens.
You don't have to make a new file you don't have to save code in the file you don't have to navigate
to it and then execute it.
You can just go right away.
Cool.
So hopefully that went ok for you.
If not make sure you leave a comment on the discussion board.
Talk about what went wrong.
Definitely copy and paste any error messages that you see along the way.
In order for us to help you because it probably has to do with either the version of Windows that you're
running maybe you've installed Python before.
There's a couple of things I could come up but it really depends on the specifics of your machine.
All right so the next video we're going to get typing our first program.
I warn you it's going to be very simple but it's going to be a real program in a real Python file that
we execute and then that will be our final test to make sure everything is installed and then we'll
move on to actually learning Python finally.
All right.
See that.