Introduction to Python
Installing Python and IDE Setup
Installing Python and IDE Setup
By the end of this lesson you will have Python installed on a computer and a place to write code, and you will be able to confirm that everything works.
Step 1: Download Python
Go to python.org/downloads and download the latest version for your system (Windows is most common in our labs). Run the installer.
Very important on Windows: on the first screen of the installer, tick the box that says "Add Python to PATH" before clicking Install. This one tick saves you many headaches later.
Step 2: Confirm it installed
Open Command Prompt (search "cmd" in the Start menu) and type:
python --version
If you see something like Python 3.12.0, you are ready. If it says "not recognised", Python was likely installed without the PATH tick - re-run the installer and tick it.
Step 3: Choose where to write code (an IDE or editor)
An IDE (Integrated Development Environment) is a program for writing and running code comfortably. Two good free choices:
- IDLE - comes free with Python. Open it from the Start menu. Perfect for beginners; nothing to install.
- VS Code - a powerful free editor from Microsoft. Install the "Python" extension after installing VS Code. This is what many professionals use.
For this course, IDLE is enough to start. Move to VS Code when you feel ready.
Try It Yourself
- Open IDLE. You will see a window with
>>>- this is the Python shell. - Type
print("I installed Python")and press Enter. - If your message appears, congratulations - your setup works.
Key Terms
- Install - to put a program onto your computer.
- PATH - a setting that lets you run Python from anywhere on Windows.
- IDE - a program for writing, running and fixing code.
- IDLE - the simple editor that ships with Python.
- Shell - the window where you can type Python one line at a time.
Summary
Download Python from python.org, tick "Add to PATH", confirm with python --version, and write code in IDLE or VS Code. With your tools ready, the next lesson is your first real program.