If your course has just asked you to submit Python code and you are working out how to install Python for the first time, the whole setup usually takes one sitting: check what is already on your computer, install the official release, confirm it works, and run a short program you wrote yourself. The steps below follow the official Python documentation, which is the place to check if your screen looks different from what is described here.
Check whether Python is already installed
Open a terminal (Command Prompt or PowerShell on Windows, Terminal on macOS or Linux) and type python --version, or python3 --version on macOS and Linux. Python comes preinstalled on most Linux distributions (Python Software Foundation, n.d.-d), so Linux users may only need to confirm the version number matches what the course asks for.
Recent versions of macOS include a python3 command that points to an older, Apple-controlled copy used by Apple's developer tools, and the documentation advises leaving that copy alone (Python Software Foundation, n.d.-c). Seeing a version number on a Mac therefore does not always mean you have a current release.
How to install Python from python.org
On Windows, the documentation now recommends the Python install manager, available from python.org/downloads or the Microsoft Store, after which the python, py and pymanager commands should work in any terminal (Python Software Foundation, n.d.-a). During the first install you may be asked to add a folder to your PATH; that step is optional if you are happy to use the py command.
On macOS, download the installer package from python.org, double-click it and follow the steps, then run the Install Certificates command in the new Python folder inside Applications to finish the setup (Python Software Foundation, n.d.-c). Install the version your module names, and if it names none, the documentation recommends the most recent supported release.
Try the interactive prompt
Type python (or python3) in a terminal and press Enter, and you should see a short welcome message with the version number followed by the >>> prompt, which means Python is waiting for a command (Python Software Foundation, n.d.-e). Try print("Hello"), press Enter, and the word should appear on the next line. Type quit() to leave the prompt when you are done.
Write your first program in IDLE
IDLE is the simple editor that ships with the official Python installers, and the macOS install places it in the Python folder inside Applications (Python Software Foundation, n.d.-c). On some Linux systems it is a separate package, which the documentation shows how to add with your distribution's package manager (Python Software Foundation, n.d.-d).
Open IDLE, choose File and then New File to open an editor window (Python Software Foundation, n.d.-b), and type this short program:
name = input("What is your name? ")
print("Hello, " + name + ". Python is working on this computer.")
Save the file as hello.py in a folder you can find again, such as one named for the module, because keeping each assignment in its own folder makes the next step easier.
Run the program from IDLE or a terminal
In the editor window, choose Run and then Run Module, and IDLE checks the file, restarts its shell and runs your code, with any output shown in the Shell window (Python Software Foundation, n.d.-b). Type your name when asked, and the greeting confirms that everything is set up.
You can also run the same file from a terminal by moving into its folder and typing python hello.py (or python3 hello.py), since giving Python a file name tells it to read and execute that script (Python Software Foundation, n.d.-e). Learning both routes is worth the few extra minutes, because many course handbooks describe running code from a terminal, and an error message there is often easier to copy into a question for your tutor.
If you get stuck on an error or want someone to walk through your first assignment with you, coding support and one-to-one tutoring can help you understand and fix your own code.
Frequently asked questions
Which version of Python should I install?
Install the version your module or lab sheet names, and otherwise choose the most recent supported release, as the official macOS guidance recommends (Python Software Foundation, n.d.-c).
Why does my terminal say python is not found?
On Windows, the documentation's troubleshooting table suggests confirming that the Python install manager is installed, checking that the Python aliases are switched on under Manage app execution aliases, and testing whether the py command works (Python Software Foundation, n.d.-a). On macOS and Linux, try python3 in place of python.
Do I need a separate code editor to start?
IDLE is enough for a first program and for many early exercises, though your course may ask for a particular editor later, so check the module guidance before installing anything extra.
References
Python Software Foundation. (n.d.-a). Using Python on Windows. Python documentation.
Python Software Foundation. (n.d.-b). IDLE. Python documentation.
Python Software Foundation. (n.d.-c). Using Python on macOS. Python documentation.
Python Software Foundation. (n.d.-d). Using Python on Unix platforms. Python documentation.
Python Software Foundation. (n.d.-e). Using the Python interpreter. Python documentation.



