Full Web Apps with FastAPI Transcripts
Chapter: Setup and following along
Lecture: Do you have Python?

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Before we start writing code and just jump right into our editor,
0:03 let's make sure that you have your machine set up and you can follow along,
0:07 and you can build these applications with the course.
0:10 It's really important that you follow along.
0:13 So when we do stuff in the course at the end of a chapter,
0:16 stop and go back and add that to either the same application that you're building along
0:20 with me or create a parallel but very similar application and add the functionality over there
0:26 So in this super short chapter,
0:28 what we're going to do is just go through and make sure that your machine has
0:31 all the requirements and tools that you need.
0:34 The first question is, do you have Python?
0:37 And importantly, is it the right version?
0:40 FastAPI has a minimum requirement of python 3.6,
0:43 and we're also using features like f-strings in our code that require python 3.6 or
0:49 later. So you need 3.6 we're actually gonna be using,
0:52 a higher version. But make sure you have at least Python 3.6. You wanna
0:56 know, do I have python?
0:58 It's a little bit complicated to tell,
0:59 but here's a couple things we can do.
1:01 If you're on Mac or Linux,
1:03 Yu can go and type python3 -V and you'll get some kind of answer.
1:09 Either Python 3 doesn't exist, in which case you need to go get Python or
1:12 make sure it's in your path.
1:14 Or it might be higher version lower version,
1:17 whatever. You need to make sure that this runs and that you get 3.6 or above,
1:21 we're gonna be using 3.9.1 Actually,
1:23 during this course. On Windows, it's a little bit less obvious.
1:27 There's a few things that make this challenging if you're not totally sure.
1:31 So on Windows, what you type usually is python,
1:35 not python3, even though you want Python 3.
1:38 So you say python -V.
1:40 And if you get an output like this Python 3.9, 3.9.1 or whatever as longs that's above 3.6, you're
1:46 good to go, but here's where it gets tricky if your path is set up
1:51 to find, say Python 2.
1:53 But you actually have Python 3 in your system
1:55 it's just later in the path definition.
1:57 You're going to need to adjust your path or be a little more explicit how you
2:00 reference that executable. And here is the super tricky part.
2:04 Python on Windows 10 is not included.
2:07 But there is this Shim application whose job is to take you to the windows store
2:12 and help you get Python. If you don't have it yet,
2:16 it will respond to python -V but it will respond by having no output.
2:22 It won't tell you that Python is not actually installed that you need to go to the
2:26 store and get it. It will just do nothing.
2:28 So if you type python -V and nothing happens,
2:32 that means you don't actually have python.
2:34 You just have the shim that if you took away the V,
2:37 would open the Windows store for you to get it and so on.
2:41 So just make sure you get an actual output when you say python -V
2:45 or, you know, follow the instructions coming up on how to get it.
2:49 Speaking of getting python, if you need it,
2:51 go visit realpython.com/installing-python/.
2:54 They've got a big range of options for all the different operating systems,
2:59 the trade offs, how to install it for your operating system.
3:01 And they're keeping this up to date.
3:03 So just drop over there, get it installed in your machine and come back to the course, ready to roll.