Python 3 Installation on Windows 10/11: Complete Step-by-Step Guide
To start developing applications using Python 3, we need to install Python 3 on our machine. This guide will show you how to install Python 3 on Windows 10 or Windows 11, download the latest release, verify installation, and customize settings.
Whether you’re a beginner or an experienced developer, this guide will help you get Python up and running in no time. For beginners looking to start with Python, explore our Introduction to Python to establish a strong understanding of the core concepts.
Step 1: Download latest Python 3 release for Windows
We recommend downloading Python directly from the Python official website to ensure we have the most up-to-date and secure version. Python 3 release downloads are available form multiple other sources but we should always prefer to download from the Python official website. Avoid third-party sources, as they may contain outdated or modified versions of the Python installer. Currently Python 3.12.4 is the latest Python 3 release. We can download 32-bit or 64-bit Windows Installer as per the system configuration.
Step 2: (Optional) Verify the MD5 Sum for the Downloaded Installer
While this step isn’t mandatory, verifying the MD5 sum ensures the installer hasn’t been corrupted during download. It’s always better to compare to the MD5 sum for the downloaded installer. Here’s how we can verify the Python downloaded installer:
- Navigate to the directory where we have downloaded or saved the Python installer.
- Open the command prompt in that directory.
- Run the following command:
CertUtil -hashfile <path-of-python-windows-installer> MD5
Provide the path (name) of Python 3 release Window Installer and run the command.
D:\>CertUtil -hashfile python-3.12.4-amd64.exe MD5
MD5 hash of python-3.12.4-amd64.exe:
f3df1be26cc7cbd8252ab5632b62d740
CertUtil: -hashfile command completed successfully.
Compare the MD5 hash of the downloaded file with the one provided on the Python website. If they match, we can proceed confidently with the installation.
Step 3: Run Python 3 Windows Installer for a Complete Installation
Once we have downloaded the Python installer, run the Python 3 Windows Installer to begin the installation process on Windows 10 or Windows 11
Click Install Now to start a standard Python 3 installation with default settings. Click on Customize installation for customized installation.
Python 3 Customized installation
By choosing the Python 3 Customize Installation option, we can select specific features like pip (Python’s package manager), additional documentation, and advanced settings for our development needs. This is especially useful if we want more control over our Python environment.
Python 3 Windows installation should be successful.
Validate Python 3 Installation
Once the Python 3 installation is complete, it’s important to verify that everything is set up correctly. We can validate the Python installation by checking the installed Python version:
- Open the Command Prompt
- Run the following command
python --version
python
Installing Python on Other Operating Systems
If you’re using a Linux-based system like Ubuntu, follow our detailed guide on Python 3 Installation on Ubuntu Linux to get Python set up on your machine.
Summary
In this article we followed the steps to install Python 3 on Windows 10 or Windows 11. Following steps were followed:
- Python 3 Installation on Windows 10/11: Complete Step-by-Step Guide
- Step 1: Download latest Python 3 release for Windows
- Step 2: (Optional) Verify the MD5 Sum for the Downloaded Installer
- Step 3: Run Python 3 Windows Installer for a Complete Installation
- Python 3 Customized installation
- Validate Python 3 Installation
- Installing Python on Other Operating Systems
Interview Questions & Answers
What is the significance of adding Python to the PATH during installation?
Adding Python to the PATH environment variable allows us to run Python from any path on the command line (CMD or PowerShell), we don’t need to specify full directory path of the Python installation or Python interpreter. This allows us to launch Python interpreter simply typing python
or python3
from any path location on the system. This also allows to run Python scripts directly from any path.
python
command is not recognized?
What steps would you take if Python 3 is installed but the If Python 3 is successfully installed on the system but the python
command is not recognized, then it usually means that Python was not added to the PATH environment variable during installation. To resolve this issue, we can manually add Python to the PATH environment variable. Following steps to follow:
- Locate Python Installation: Find the Python installation folder. If default path was selected during installation then it should be in directory like
C:\Python3x
orC:\Users\ComputerName\AppData\Local\Programs\Python\Python3x
. - Add both Python interpreter and Python Scripts folder to system PATH
- Restart Command Prompt: Close and reopen Command Prompt windows for the changes to take effect. This time it should be able to run Python either with
python
orpython3
.
What could be the possible reasons if Python 3 installation fails on Windows?
Python 3 installation can fail on windows because of multiple reasons.
- Permissions Issue – To successfully install and configure an application, we generally require administrative privilege. Run the installation with administrative access.
- Corrupted Installer – Reevaluate the installer. Always download the python installer from Python official website and verify the MD5 code for it. Re-download the installer from the official Python website.
- Security Interference – Sometimes security policy or antivirus software might block the installation process. Temporarily disable security policy or antivirus software during installation.
- Pre-existing Python Installation – If another version of Python already installed and new installation get conflicted with previous Python version. Uninstall the older Python version or change the installation path for new version.
- Disk Space: Insufficient disk space can cause the installation to fail. Ensure to have enough space on the drive where Python is being installed.
pip
, and how do you ensure it is installed with Python 3?
What is pip
is Python’s package manager, which allows you to install and manage additional Python libraries and packages.
pip
generally get installed by default with Python 3. To ensure pip
gets installed with Python 3, make sure the box labeled “Install pip” is checked during the Python installation process. Once Python 3 installation is complete, verify pip
is installed. Open Command Prompt with administrator access and type pip --version
. This command should return the pip
version number.
Test Your Knowledge: Practice Quiz
Related Topics
- Understanding Scope in Python Programming (with Example Programs)In previous articles, we learned about following topics: Understanding Scope in Programming Generally, in the scope of a program, a variable can be declared only once with the same name. But, it’s possible to declare variables with the same name in different scopes within the same program. Changing the value of a variable within a…
- Understanding Number Datatype in Python: Decimal, Octal and Hexadecimal NumbersUnderstanding the Number Datatype in Python: A Comprehensive Overview Number datatype in Python is a combination of different number format classes like Integer, Float, and Complex. Python supports the Decimal, Octal decimal, and Hexadecimal number systems. Program – Integer Number datatype Output of the Integer Number datatype program: Note from the output: Exploring Float Number…
- Introduction to Variables in Python & Variable Data TypesWhat are Variables in Python In Python, variables act as references to reserved memory locations where actual values are stored. Each variable name points to a specific memory address that holds the assigned value. In this case: How Variable Memory Works When we define variables, like height = 175, Python allocates a specific memory location…
- What Are Comments and Docstring in Python (With Programs)?Before we start learning about Comments and Docstring in Python and its concepts, we should setup our Python Integrated Development Environment (IDE) on our local machine. Read through the following articles to learn more about What is an IDE, Popular IDEs for Python and Python installation on your machine. Introduction to Comments in Python In…
- Popular IDEs for Python in 2024 – Best Python Development EnvironmentsIDEs are very important tool (application) for the software development. Working with good IDE improves the performance and working capability of a software developer. That is why it’s important to choose a good IDE for software development. Different developers choose different IDEs as per their working. Before we start looking into details of the popular…