How to Install Python on Windows 10 | DigitalOcean (2024)

Introduction

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.

  1. Go to the official Python download page for Windows.

  2. Find a stable Python 3 release. This tutorial was tested with Python version 3.10.10.

  3. Click the appropriate link for your system to download the executable file: Windows installer (64-bit) or Windows installer (32-bit).

    How to Install Python on Windows 10 | DigitalOcean (1)

  1. After the installer is downloaded, double-click the .exe file, for example python-3.10.10-amd64.exe, to run the Python installer.

  2. Select the Install launcher for all users checkbox, which enables all users of the computer to access the Python launcher application.

  3. Select the Add python.exe to PATH checkbox, which enables users to launch Python from the command line.

    How to Install Python on Windows 10 | DigitalOcean (2)

  4. 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.

  5. 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.

    How to Install Python on Windows 10 | DigitalOcean (3)

    Select some or all of the following options:

    • Documentation: recommended
    • pip: recommended if you want to install other Python packages, such as NumPy or pandas
    • tcl/tk and IDLE: recommended if you plan to use IDLE or follow tutorials that use it
    • Python test suite: recommended for testing and learning
    • py launcher and for all users: recommended to enable users to launch Python from the command line
  6. Click Next.

  7. The Advanced Options dialog displays.

    How to Install Python on Windows 10 | DigitalOcean (4)

    Select the options that suit your requirements:

    • Install for all users: recommended if you’re not the only user on this computer
    • Associate files with Python: recommended, because this option associates all the Python file types with the launcher or editor
    • Create shortcuts for installed applications: recommended to enable shortcuts for Python applications
    • Add Python to environment variables: recommended to enable launching Python
    • Precompile standard library: not required, it might down the installation
    • Download debugging symbols and Download debug binaries: recommended only if you plan to create C or C++ extensions

    Make note of the Python installation directory in case you need to reference it later.

  8. Click Install to start the installation.

  9. After the installation is complete, a Setup was successful message displays.

    How to Install Python on Windows 10 | DigitalOcean (5)

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 Python.

  1. Go to Start and enter advanced system settings in the search bar.

  2. Click View advanced system settings.

  3. In the System Properties dialog, click the Advanced tab and then click Environment Variables.

  4. Depending on your installation:

    • If you selected Install for all users during installation, select Path from the list of System Variables and click Edit.
    • If you didn’t select Install for all users during installation, select Path from the list of User Variables and click Edit.
  5. Click New and enter the Python directory path, then click OK until all the dialogs are closed.

Step 4 — Verify the Python Installation

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:

python --version

An example of the output is:

Output

Python 3.10.10

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).

How to Install Python on Windows 10 | DigitalOcean (6)

You can start coding in Python using IDLE or your preferred code editor.

Conclusion

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.

How to Install Python on Windows 10 | DigitalOcean (2024)

FAQs

Does Windows 10 come with Python installed? ›

Windows does not have the Python programming language installed by default. However, you can install Python on Windows in just a few easy steps. This guide provides step-by-step instructions to install and set up Python on Windows. A system running Windows 10 with administrator access.

How to install Python 3.10 on Windows 10? ›

Install Python on Windows
  1. Go to python.org/downloads/windows.
  2. Pick Python 3.10.X (replace X with the highest number available)
  3. Verify there's a Windows embeddable package or a Windows Installer.
  4. Select 64bit or 32bit to match your system.
Aug 5, 2022

How to install and run Python? ›

Follow these steps to install Python on your computer:
  1. Step 1: Check Your System. ...
  2. Step 2: Download Python. ...
  3. Step 3: Choose the Right Version. ...
  4. Step 4: Download the Installer. ...
  5. Step 5: Run the Installer. ...
  6. Step 6: Verify the Installation. ...
  7. Step 7: Install a Code Editor (Optional) ...
  8. Step 8: Write Your First Python Code.
Nov 7, 2023

How to check if Python is installed on Windows? ›

To check if Python is installed on your Windows machine using the Start Menu, follow these steps: Press the Windows key or click on the Start button to open the Start Menu. Type "python". If Python is installed, it should show up as the best match.

How do I install Python for the first time? ›

Installing Python on Windows takes a series of few easy steps.
  1. Step 1 − Select Version of Python to Install. ...
  2. Step 2 − Download Python Executable Installer. ...
  3. Step 3 − Run Executable Installer. ...
  4. Step 4 − Verify Python is installed on Windows. ...
  5. Step 5 − Verify Pip was installed.
Feb 26, 2024

Which Python should I download? ›

For the sake of compatibility with third-party modules, it is always safest to choose a Python version that is one major point revision behind the current one. At the time of this writing, Python 3.8. 1 is the most current version. The safe bet, then, is to use the latest update of Python 3.7 (in this case, Python 3.7.

How do I know if Python 3.10 is installed? ›

Check Current Version: Verify your current Python version by running python --version or python3 --version.

How to run a Python program in Windows 10? ›

To run Python scripts with the python command, you need to open a command-line window and type in the word python followed by the path to your target script: Windows.

How do I run Python after installing? ›

After installation, Python may be launched by finding it in Start. Alternatively, it will be available from any Command Prompt or PowerShell session by typing python . Further, pip and IDLE may be used by typing pip or idle . IDLE can also be found in Start.

How to install Python3 on Windows? ›

Install Python3 on Windows 10
  1. Prerequisites.
  2. Step #1: Get the Python Executable Installer.
  3. Step #2: Run the Installer.
  4. Step #3: Confirm That Python is Set Up On Windows 10.
  5. Step #4: Confirm That the pip is Installed.
Jan 11, 2024

How do I start and run Python? ›

In order to run Python in the terminal, simply type python and hit Enter. This will launch the Python interpreter, allowing you to execute Python code directly in the terminal. You can exit the interpreter by typing exit() or pressing Ctrl + D.

How to install Python and set path in Windows 10? ›

For Windows 10/8/7:
  1. Open System Properties (Right click Computer in the start menu, or use the keyboard shortcut Win + Pause )
  2. Click Advanced system settings in the sidebar.
  3. Click Environment Variables...
  4. Select PATH in the System variables section.
  5. Click Edit.
May 19, 2010

How to install Python 3.11 on Windows 10? ›

Steps to Download Python on Windows 10
  1. Step 1: Visit the Python Website and Navigate to the Downloads Section.
  2. Step 2: Choose the Python Version.
  3. Click on the version you want to download. ...
  4. Step 3: Download the Python Installer.
  5. Once the download is complete, run the installer program.
May 15, 2024

Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5525

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.