By Meghna Gangwar
The Python programming language is an increasingly popular choice for both beginners and experienced developers. Flexible and versatile, Python has strengths in scripting, automation, data analysis, machine learning, and back-end development.
In this tutorial you’ll install Python on Windows 10 using the Python installer for Windows.
Deploy your frontend applications from GitHub using DigitalOcean App Platform. Let DigitalOcean focus on scaling your app. <$>
<$>[note] Note: If you’re interested in learning how to use Windows PowerShell and package managers, and install and set up Python on Windows 10 using a command-line interface, then check out How To Install Python 3 and Set Up a Local Programming Environment on Windows 10.
Note: If you want to use Python for web development, then Microsoft recommends installing Python using the Windows Subsystem for Linux.
You’ll need a computer running Windows 10 with administrative privileges and an internet connection.
Go to the official Python download page for Windows.
Find a stable Python 3 release. This tutorial was tested with Python version 3.10.10.
Click the appropriate link for your system to download the executable file: Windows installer (64-bit) or Windows installer (32-bit).
After the installer is downloaded, double-click the
.exe file, for example
python-3.10.10-amd64.exe, to run the Python installer.
Select the Install launcher for all users checkbox, which enables all users of the computer to access the Python launcher application.
Select the Add python.exe to PATH checkbox, which enables users to launch Python from the command line.
If you’re just getting started with Python and you want to install it with default features as described in the dialog, then click Install Now and go to Step 4 - Verify the Python Installation. To install other optional and advanced features, click Customize installation and continue.
The Optional Features include common tools and resources for Python and you can install all of them, even if you don’t plan to use them.
Select some or all of the following options:
The Advanced Options dialog displays.
Select the options that suit your requirements:
Make note of the Python installation directory in case you need to reference it later.
Click Install to start the installation.
After the installation is complete, a Setup was successful message displays.
Skip this step if you selected Add Python to environment variables during installation.
If you want to access Python through the command line but you didn’t add Python to your environment variables during installation, then you can still do it manually.
Before you start, locate the Python installation directory on your system. The following directories are examples of the default directory paths:
C:\Program Files\Python310: if you selected Install for all users during installation, then the directory will be system wide
C:\Users\Sammy\AppData\Local\Programs\Python\Python310: if you didn’t select Install for all users during installation, then the directory will be in the Windows user path
Note that the folder name will be different if you installed a different version, but will still start with
Go to Start and enter
advanced system settings in the search bar.
Click View advanced system settings.
In the System Properties dialog, click the Advanced tab and then click Environment Variables.
Depending on your installation:
Click New and enter the Python directory path, then click OK until all the dialogs are closed.
You can verify whether the Python installation is successful either through the command line or through the Integrated Development Environment (IDLE) application, if you chose to install it.
Go to Start and enter
cmd in the search bar. Click Command Prompt.
Enter the following command in the command prompt:
An example of the output is:
You can also check the version of Python by opening the IDLE application. Go to Start and enter
python in the search bar and then click the IDLE app, for example IDLE (Python 3.10 64-bit).
You can start coding in Python using IDLE or your preferred code editor.
You’ve installed Python on your Windows 10 computer and are ready to start learning and programming in Python. Next, you can write your first program in Python 3 and continue your learning with more Python tutorials.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.