Python is a high-level programming language used by millions of programmers and developers. It is intuitive, offers many useful tools and libraries, and is essential for working with and analyzing large datasets. However, Python is not pre-installed on Windows operating systems. This guide will walk you through installing Python on Windows 10.
There are two main versions of Python: Python 2 and Python 3, and they are patible.
Python 3 was released in 2008 to address issues found in Python 2. It offers more straightforward, intuitive syntax, a wide range of useful libraries (especially for data analysis), and a large community supports it.
Python 2 is no longer supported, unlike Python 3. Therefore, for new projects, you only need Python 3. However, if you need to work on projects written in Python 2, you might still need this version, so we will also explain how to install it.
To install Python 2 on Windows 10:
Open your browser and go to the official website python.org.
Go to the Downloads section.
In the Downloads section, find the section for specific releases and locate the version you need.
The last Python 2 release is 2.7.18. Click on Download and check the related files.
For your operating system, download the 64-bit installer (it is the last file in the list).
Once the file is downloaded, open it.
Before starting the installation, the installer will allow you to choose the installation path and additional tools. Select the necessary options and start the installation.
There are several ways to install Python, each with its own features, advantages, and disadvantages:
Full Installation: Installs all components of Python, which is ideal for most projects.
Microsoft Store Installation: Suitable for development environments and running scripts.
NuGet Package Installation: Python comes as a ZIP file with the .nupkg extension, designed for continuous integration systems. It does not include the user interface. Ideal for building packages and running scripts.
Embeddable Package: Installs a minimal version of Python, often used as part of a larger application or project.
The steps for installing Python 3 from the official website are similar to those for Python 2. Here’s how to install Python 3 on Windows 10:
Open your browser and go to python.org.
Go to the Downloads section.
Click on Download Python x.x.x (the latest version).
Once you click it, the installer will start downloading.
After downloading, open the installer.
If Python 3 is already installed, the installer will offer to update it to the version you just downloaded. If Python is not installed, it will offer a fresh installation. Make sure to check the following options:
Installing for all users.
Add Python to PATH
(this allows you to use Python from the command line).
There are two installation options:
Administrator rights are not required.
Python will be installed in your user directory.
Standard libraries, test suites, a launcher, and pip will be installed.
May require administrator rights.
Python will be installed in the Program Files directory.
Additional features can be installed.
The Python standard library can be precompiled into bytecode.
Choose the option that suits you and start the installation. After it finishes, disable the MAX_PATH length limitation to avoid errors related to file path length.
To check if the installation was successful, run the command python --version
in the command line. If everything went well, you should see an output like this:
Python 3.10.8
Python is now installed and ready to use.
To install Python from the Microsoft Store:
Open the Microsoft Store application.
In the search bar, type Python 3.x, specifying the version you want (e.g., "Python 3.10").
Click Get.
The download and installation will begin automatically.
To install Python on Windows via NuGet:
Go to the official website and navigate to the Downloads section. Select the recommended version and download it.
After opening the downloaded file, installation will take just a few seconds.
To install Python, open Windows PowerShell and run the following commands:
For the 64-bit version:
nuget.exe install python -ExcludeVersion -OutputDirectory
For the 32-bit version:
nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory
The embeddable package provides a minimal Python environment. It is distributed as a ZIP file and is intended to integrate Python into larger applications. The embeddable package is not designed for direct user access.
You will have a fully isolated Python environment when extracted from the archive. It will be isolated from the user’s operating system, including environment variables (like PATH), the system registry, and any installed packages. The standard Python library is included in the embeddable package as compiled and optimized files. However, this version does not include a package manager (pip) or documentation.
You can download the embeddable package from the python.org website:
Go to the Downloads section.
Clicking on Download will download the regular version, so click the hyperlink for Python for Windows instead.
Click Latest Python 3 Release - Python x.x.x.
Scroll down to the Files section and choose one of the embeddable versions (for 64-bit or 32-bit systems).
This guide has covered various methods for installing Python on Windows 10. For more useful Python resources, you can explore our tutorials. If you want to build a web service using Python, you can rent a cloud server at competitive prices with Hostman.