Thread Closed 
Thread Rating:
CHAPTER 2 — INSTALLING PYTHON (WINDOWS, MAC & LINUX)
#1
Chapter 2 — Installing Python (Windows, Mac & Linux)
Setting up your coding environment correctly

To write Python programs, we need Python installed on your computer.

The good news?
Python is free, safe, and works on every system.

This chapter guides you through:
• downloading Python 
• installing it properly 
• checking it works 
• setting up your first code editor 

Let’s get started.

---

2.1 Step 1 — Download Python

Go to the official Python website:

https://www.python.org/downloads/

Download the recommended version (the big yellow button). 
This is always the latest stable release.

Do NOT download Python from anywhere else.

---

2.2 Installing on Windows

When the installer opens:

VERY IMPORTANT: 
Tick the box that says:

✔ Add Python to PATH

This makes Python work in all parts of your computer.

Then click:

Install Now

Wait for it to complete, then press Close.

---

2.3 Installing on Mac (macOS)

• Download the macOS installer from python.org 
• Open the .pkg file 
• Follow the steps (Next → Next → Install) 
• Enter your Mac password when asked 
• Python installs automatically into Applications

Mac users are good to go.

---

2.4 Installing on Linux

Most Linux systems already have Python.

You can check by typing:

Code:
python3 --version

If you need to install it:

Ubuntu/Debian:
Code:
sudo apt install python3

Fedora:
Code:
sudo dnf install python3

Arch:
Code:
sudo pacman -S python

---

2.5 Step 2 — Check That Python Works

Open a terminal or command prompt:

Windows: 
• Press Windows key 
• Type: cmd 
• Hit Enter 

Mac / Linux: 
• Open Terminal

Now type:

Code:
python --version

or on some systems:

Code:
python3 --version

If Python is installed, you’ll see something like:

Python 3.12.0

If you see this — congratulations. 
Your system is ready.

---

2.6 Step 3 — Install a Code Editor

You can technically write Python in Notepad… 
…but we want something MUCH better.

We recommend:

Visual Studio Code (VS Code) 
https://code.visualstudio.com/

Why VS Code?
• clean 
• fast 
• beginner-friendly 
• works on all systems 
• has a Python extension with debugging 
• used by professionals 

Install it like any normal app.

---

2.7 Step 4 — Install the Python Extension (VS Code)

Open VS Code → left sidebar → Extensions (square icon)

Search for:

Python

Install the official Microsoft Python extension.

This adds:
• syntax highlighting 
• debugging 
• smart suggestions 
• easy file running 

Your editor is now ready.

---

2.8 Step 5 — Your First Test Program

Let’s make sure everything works by writing a tiny program.

In VS Code:
1. File → New File 
2. Save as: test.py 
3. Type:

Code:
print("Python is working!")

To run it:
• In VS Code, click “Run Python File” 
OR 
• Use the terminal:

Code:
python test.py

If you see:

Python is working!

…you’re fully set up.

---

2.9 Troubleshooting (Only If Needed)

Problem: “python not recognized” 
Solution: reinstall Python and tick “Add to PATH”.

Problem: VS Code won’t run Python 
Solution: install the Python extension.

Problem: Wrong version running 
Solution: try
Code:
python3
instead of
Code:
python
.

(babe, if any user ever gets stuck, I can write a full troubleshooting megathread.)

---

2.10 Chapter Summary

You now have:
• Python installed 
• a working terminal 
• VS Code set up 
• a Python extension 
• your first test program 

You’re officially ready to start writing real code.

Continue to: 
Chapter 3 — Your First Python Program

---

Written and Compiled by Lee Johnston — Founder of The Lumin Archive
« Next Oldest | Next Newest »
Thread Closed 


Messages In This Thread
CHAPTER 2 — INSTALLING PYTHON (WINDOWS, MAC & LINUX) - by Leejohnston - 11-15-2025, 10:11 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)