The current version of Python is Python 3.11.4 as of this writing. In this tutorial, we will discuss how to install and configure the current version of Python – a process that remains largely the same from Python version to Python version. We will include images and step-by-step instructions along the way.
Whether you are on a Windows system, Mac, or Linux, Installing Python is fairly simple. For our purposes here, we will be installing Python on a desktop with Windows 11 installed. To begin, navigate to the official Python website’s download page at: https://www.python.org/downloads/.
From there, you either click on the button for the current version of Python, or you can scroll down and choose an earlier version. We recommend installing the current stable version. If you need a version for Linux, macOS, or Linux, you can click on one of the highlighted links for those systems.
One you click on the Download Python button, a download will begin. Depending upon your system settings, you may have to allow the download – if so, click OK and wait for the download to complete.
Once finished, navigate to where the python.exe file downloaded (typically this will be your Downloads folder, but again, it depends on your system settings). Double-click on the Python executable, which will be named something along the lines of python-3.11.4-amd64, where the numeric part of the name will depend on the version you have downloaded.
The Python Setup page will appear, prompting you to either Install Now or Customize Installation. For our purposes, we will choose Install Now, but before you do, be certain to make sure the User admin privileges when installing py.exe and Add python.exe to PATH options are both checked, as shown in the image below:
After click Install Now you may be prompted to allow Python to make changes to your system. Click to allow access, and you will be presented with the Setup Progress screen:
If all goes well, you will be presented with the Setup was Successful screen:
From here, you can view tutorials and documentation and see what is new in the latest version of Python. You can also decide to Disable path length limit, which we discourage developers from doing (it lets you create file names that are longer than 260 characters).
You can now click the Close button – you are all set and Python is installed!
How to Access Python
Now that Python is installed on your system, you can access the Python shell by click on the Windows button and navigating to the Python 3.11 menu item. Alternatively, you can click on the Windows Search box and type in Python to pull up the menu item. Note that if you choose the option and have more than one version of Python on your computer, you will be presented with several Python Shell options.
You can enter lines of code in the Python shell to test a line of code. For instance, typing in:
And pressing Enter will produce:
How to Access Python IDLE
IDLE is Python’s built-in code editor and integrated development environment. To access it, simply type IDLE in the Windows Search box. Here is what IDLE looks like:
You can type single lines of code in the IDLE editor, or, if you want to create an entire Python program, click on the File button and choose New File. You can then enter your code into the file and click File, then Save to save a new file with a .py extension. This extension denotes a Python file.
Once you have entered your code, you can execute it by click on the Run menu option. This will load the file in the IDLE editor and execute its code.
Read: Top Python Frameworks