Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
In this video, we’ll walk through how to install Python so it’s ready to use on your local machine.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
The first step of installing Python is to
navigate to their website, python.org.
0:00
Python's website is home to its
extensive documentation, so
0:07
I recommend coming back whenever
you need some guidance.
0:10
For this workshop, we'll hover over
the Downloads tab to see what's available.
0:15
At the time of this recording,
the most recent Python version is 3.11.2.
0:20
Since you're viewing this from the future,
you will likely see a higher version.
0:27
The installation process
shouldn't have changed, but
0:31
if your screen looks drastically
different from mine,
0:34
be sure to check the teacher's notes for
this video.
0:38
Let's click on the button
here that says Python and
0:42
the version number and
a download will start.
0:45
This may take up to a few minutes
depending on your internet speed.
0:49
Once it's done,
open up your downloaded file and
0:54
it will bring up the Python installer.
0:58
You're welcome to read all the text
content here, but I will simply click
1:01
the Continue button for the first three
screens and then agree to the terms.
1:06
Once we're on the Installation Type
screen, we do have the option
1:13
to customize our installation, but
I will be doing a standard install.
1:17
Press the Install button and
you'll be prompted to enter your password.
1:22
Then we'll sit back and wait for
Python to be installed.
1:29
Once Python has been
successfully installed,
1:36
you'll see this screen and this folder.
1:40
Here, it says that Python needs
a set of SSL root certificates.
1:45
If that means nothing to you, don't worry.
1:50
All we have to do is double-click on the
Install Certificates icon in the finder
1:53
window that just opened.
1:57
So let's do that.
1:59
That was super fast.
2:02
And now Python is properly
installed on your computer.
2:04
We can close the terminal, the Finder
window and the Python installer and
2:09
move it to the bin.
2:14
Now let's check it out.
2:16
Open up your terminal using Spotlight.
2:18
If you're unfamiliar with Spotlight,
it's macOS's system-wide search feature.
2:20
You can search for files,
applications, and more from anywhere.
2:26
You can access it by clicking the
magnifying glass icon on the top right,
2:32
or simply pressing Cmd+Space.
2:38
Open up terminal, then type
python3 --version and press Enter.
2:42
You should see Python and your installed
version being printed to the terminal.
2:50
If that doesn't work, try python --version,
2:55
or, py --version.
3:00
Great job.
3:06
One more thing we should check for is pip,
which is Python's package manager.
3:08
As mentioned in the last video,
as you work more with Python,
3:15
you'll need to install third-party
packages to use along the way.
3:18
Pip is what allows you to manage these,
whether it's downloading,
3:23
installing, uninstalling, or upgrading.
3:28
Pip should be installed by
default since Python 3.3.
3:32
But let's check that it is ready to go.
3:36
Back in your terminal,
type pip3 --version and press Enter.
3:39
We can see that pip is indeed installed.
3:47
If that doesn't work,
try pip --version instead.
3:51
Congratulations, you've just
installed Python onto your computer.
3:57
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up