There are three installation methods on Windows:
1-The Microsoft Store
2-The full installer
3-Windows Subsystem for Linux
How to Check Your Python Version on Windows
You can also use cmd.exe or Windows Terminal.
With the command line open, type in the following command and press Enter:
C:> python –version
Using the –version switch will show you the version that’s installed. OR you can use the -V
C:> python -V
In either case, if you see a version less than 3.8.4, which was the most recent version at the time of writing, then you’ll want to upgrade your installation.
If you’re interested in where the installation is located, then you can use the where.exe command in cmd.exe or PowerShell:
C:> where.exe python
Note that the where.exe command will work only if Python has been installed for your user account.
There are three ways to install the official Python distribution on Windows:
1-Microsoft Store package: The most straightforward installation method on Windows involves installing from the Microsoft Store app. This is recommended for beginner Python users looking for an easy-to-set-up interactive experience.
The key takeaway here is that the Microsoft Store package is “intended mainly for interactive use.” That is, the Microsoft Store package is designed to be used by students and people learning to use it for the first time.
The Microsoft Store package has limitations that make it ill-suited for a professional development environment. In particular, it does not have full write access to shared locations such as TEMP or the registry.
2-Full Installer: This approach involves downloading it directly from the Python.org website. This is recommended for intermediate and advanced developers who need more control during the setup process.
If you’re new to Python and focused primarily on learning the language rather than building professional software, then you should install from the Microsoft Store package. This offers the shortest and easiest path to getting started with minimal hassle.
3-Windows Subsystem for Linux (WSL): The WSL allows you to run a Linux environment directly in Windows. You can learn how to enable the WSL by reading the Windows Subsystem for Linux Installation Guide for Windows 10.
How to Install From the Microsoft Store
If you’re new and looking to get started quickly, then the Microsoft Store package is the best way to get up and running without any fuss. You can install from the Microsoft Store in two steps.
Step 1: Open the Python App Page in the Microsoft Store
Open the Microsoft Store app and search for Python.
Select Python 3.8, or the highest version number you see available in the app, to open the installation page.
The official Microsoft Store package will always be free, so if the application costs money, then it’s the wrong application.
Alternatively, you can open PowerShell and type the following command:
If you don’t already have a version of Python on your system, then when you press Enter, the Microsoft Store will automatically launch and take you to the latest version of Python in the store.
Step 2: Install the Python App
After you’ve selected the version to be installed. Follow the Steps (Instructed)
Wait for the application to download. When it’s finished downloading, the Get button will be replaced with a button that says Install on my devices.
Click Install on my devices and select the devices on which you’d like to complete the installation.
Click Install Now and then OK to start the installation.
If the installation was successful, then you’ll see the message “This product is installed” at the top of the Microsoft Store page.
Congratulations! You now have access to Python, including pip and IDLE!
How to Install From the Full Installer
For professional developers who need a full-featured Python development environment, installing from the full installer is the right choice. It offers more customization and control over the installation than installing from the Microsoft Store.
You can install from the full installer in two steps.
Step 1: Download the Full Installer
Follow these steps to download the full installer:
Open a browser window and navigate to the Python.org Downloads page for Windows.
Under the “Python Releases for Windows” heading, click the link for the Latest Release – Python 3.x.x. As of this writing, the latest version was Python 3.8.4.
Scroll to the bottom and select either Windows x86-64 executable installer for 64-bit or Windows x86 executable installer for 32-bit.
If you aren’t sure whether to select the 32-bit or the 64-bit installer, then you can expand the box below to help you decide.
When the installer is finished downloading, move on to the next step.
Step 2: Run the Installer
Once you’ve chosen and downloaded an installer, run it by double-clicking on the downloaded file. A dialog box like the one below will appear:
Windows installation dialog
There are four things to notice about this dialog box:
The default install path is in the AppData/ directory of the current Windows user.
The Customize installation button can be used to customize the installation location and which additional features get installed, including pip and IDLE.
The Install launcher for all users (recommended) checkbox is checked default. This means every user on the machine will have access to the py.exe launcher. You can uncheck this box to restrict Python to the current Windows user.
The Add Python 3.8 to PATH checkbox is unchecked by default. There are several reasons that you might not want on PATH, so make sure you understand the implications before you check this box.
The full installer gives you total control over the installation process.