- General Instructions to Install Python
- How to install the Python Interpreter on a Windows machine?
- How to use IDLE with files?
- Helpful notes
- Go to https://www.python.org/
- Roll over the Downloads link on the top blue bar. You should get a button to download the version for your operating system.
- Be sure to choose the latest Python version that starts with
- Double-click the downloaded file to install. Follow all instructions.
At the end of the install, click on Install Certificates to install a set of current SSL root certificates. (See screenshots.)
Mac users: You can click yes when it asks to move the installer to the Trash.
Look carefully for any option to “add Python to PATH” - You DO want to do this — so if a box needs to be checked, check it.
If you need the step-by-step instructions on how to install your very first Python interpreter on a Windows machine, then read on.
Skip to “How to use IDLE with files?” below if you are ready to get started with IDLE.
If you have other types of OS (e.g., Linux, Mac), your process can slightly differ from these instructions. Feel free to look it up online or ask us for help during the office hours.
Open your browser and go to https://www.python.org/download
Click on the button “Download Python 3.10.X” - the specific version can change, so do not worry about it, as long as it is greater than 3.7.
Pressing the “Python 3.10.X” button will initiate the downloading process for the python installer (python installer
!= python interpreter).
If your browser asks you if you want to download this .exe file - choose “yes”.
If the browser asks you for the place to save this file - choose any folder, it is not important. (We suggest the “Downloads” folder)
Check that you see the process in your browser.
Wait until the file finishes downloading - it might take a few minutes.
Find it on your computer or in your browser (see the previous picture) and double-click on it to run it.
You should have the result, similar to the picture below. Click “Run”.
IMPORTANT! If you are on a Windows system - make sure that the last checkbox is marked!
This will help your computer know where the Python interpreter is located. You won’t fail if this is not marked, but it can bring some small difficulties to you next. (If you want to know more about that - look up “Environment Variable PATH”.)
If later you will have some failures in installation (unlikely) you can restart the installation without any checkmark here.
Copy or Print Screen or manually write down the line below the “Install now” line. It will tell you where your Python Interpreter stored. You will need it if you want to run Python on the Python Interpreter (something that we are not going to do in this course).
Press the “Install Now” line.
Wait until the installation process is finished.
See the “Installation was Successful” line. If you have not seen it, or you saw “Installation Failed” - that means your Python Interpreter is not installed! Return to the previous steps.
Congratulations! You’ve successfully done the installation. Now we learn how to check that the Python interpreter works.
Open IDLE on your computer. If you have installed Python - IDLE goes with it in one package.
⚠️ IMPORTANT: When IDLE opens, it opens what is called a Python Console - you’ll see “IDLE Shell” or “Python Shell” when you look at the very top of that window.
- If you are seeing
Type "help", "copyright", "credits" or "license()" for more information.in this window, then you are in the IDLE Python Shell.
- DO NOT use the IDLE/Python Shell to write the code for this class.
Instead, create a new file, so that your code will be saved on your computer and can be re-run.
“File” -> “New File” to create a new file or
“File” -> “Open” to open one that you previously created.
Remember to save your work somewhere you can find it. (We recommend creating a dedicated folder for your code.)
When you are in the file-editing window, you can use
“Run” -> “Run Module” to run this specific file as a script and see your code in action.
⚠️ If you are not seeing the top menu
"Run", then you are not in the file-editing window.
Note! If your program requires input you will need to provide it inside the Python console, which will be displaying the output of your program/script!
Python will put the cursor and wait until you give the input to it. It won’t run your program or give you any hints that it is waiting for something. Be careful with inputs!
If you want to stop the program that behaves unexpectedly or runs for too long - just press
C at the same time) and the program will stop with the “Keyboard stopped me” Error (
If, in IDLE file mode, you write the name of a function, type an open parenthesis
( and wait a little, you will get a help prompt that shows you how to use this function.
We hope that this is helpful 👍. If you have any follow-up questions 🧐 or comments, we look forward to addressing them on the forum.
Have a productive week!
Specials thanks to Liubov Kurafeeva and Roman Beltiukov for creating the initial instructions and screenshots.
General instructions were adopted from https://python-adv-web-apps.readthedocs.io/en/latest/.