Sunday, 06 September 2026
Advertisement Advertise Your advert could be here Reach thousands of learners and ICT professionals across Rwanda. Contact us
Advertisement Opportunity Jobs, scholarships & hackathons Fresh openings from Rwandan job boards are pulled in every hour. See openings

Installing Python, step by step

Data science from zero (no IT background) · lesson 3 of 12

In this lesson: Have a working Python on your own machine and prove it from the terminal.

Python is a free program that reads instructions you write and carries them out. Nothing here costs money. Follow the section for your own computer, then do the verification step at the end — do not skip it.

Windows

  1. Go to python.org, open the Downloads menu and click the button for the latest Python 3.
  2. Run the downloaded file.
  3. On the very first screen, tick "Add python.exe to PATH". It is a small checkbox at the bottom and it is easy to miss. This single tick is the difference between Python working and hours of confusion.
  4. Click Install Now and wait.
  5. Open the Start menu, type cmd, press Enter. A black window opens — this is the terminal.
If you forgot the PATH checkbox: do not install a second copy. Run the installer again, choose Modify, and tick "Add Python to environment variables".

macOS

  1. macOS ships an old Python that you should leave alone. Install your own.
  2. Download the macOS installer from python.org and run it, or if you already use Homebrew run brew install python.
  3. Open Terminal (Command+Space, type "terminal", Enter).
  4. On macOS the command is python3, not python. Remember that everywhere below.

Linux (Ubuntu, Debian)

Python 3 is already there. Add the two pieces that are usually missing:

sudo apt update
sudo apt install python3 python3-pip python3-venv

Verify it — everyone does this

In the terminal, type this and press Enter:

python --version        # Windows
python3 --version       # macOS and Linux

You should see something like Python 3.12.4. Any 3.x version is fine for this whole track.

Now check pip, the tool that installs extra packages:

pip --version           # Windows
pip3 --version          # macOS and Linux

When it says "command not found"

This almost always means one of three things:

  • You are on Windows and did not tick "Add to PATH" — fix with Modify, above.
  • You are on macOS or Linux and typed python instead of python3.
  • You opened the terminal before installing. Close it and open a new one — a terminal only reads its settings when it starts.

An editor to write in

Code is plain text, so any text editor works, but a code editor colours your code and points at mistakes. Install Visual Studio Code (free, from code.visualstudio.com). After it opens:

  1. Click the Extensions icon in the left bar (four squares).
  2. Search for Python, publisher Microsoft, and click Install.

Do not use a word processor or a phone notes app. They insert invisible formatting and curly quotation marks that Python cannot read.

Try it yourself

Run the two verification commands and write the version numbers in your notebook. Then type python (or python3) on its own and press Enter — you will see >>>, which means Python is now listening. Type 2 + 2, press Enter, and you have run your first Python. Type exit() to leave.

Create a free account to save progress

All lessons in this track

  1. 1
  2. 2
  3. 3
  4. 4
    Your first program, and how to run it ~20 min account needed
  5. 5
    Variables, numbers, text and input ~25 min account needed
  6. 6
  7. 7
  8. 8
    Functions: naming a piece of work ~25 min account needed
  9. 9
    Reading a real data file: CSV ~30 min account needed
  10. 10
  11. 11
    pip and virtual environments ~25 min account needed
  12. 12
Advertisement Yanjye Learn a new digital skill this week ICT, programming and professional courses with graded weekly assignments. Start free