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.

As a seasoned professional in the field of programming and software development, I bring forth a wealth of knowledge and hands-on experience to guide you through the process of installing Python on Windows 10. My expertise spans various domains, including scripting, automation, data analysis, machine learning, and back-end development—areas where Python excels.

Let's delve into the key concepts outlined in the provided article:

  1. Python's Versatility:

    • Python is recognized for its flexibility and versatility, making it a popular choice for both beginners and experienced developers.
    • Its strengths extend to scripting, automation, data analysis, machine learning, and back-end development.
  2. Installation Process on Windows 10:

    • The article focuses on installing Python on Windows 10 using the official Python installer for Windows.
    • It emphasizes the need for administrative privileges and an internet connection.
  3. Downloading and Installing Python:

    • Users are directed to the official Python download page for Windows to find a stable Python 3 release.
    • The installation process involves downloading the appropriate Windows installer (64-bit or 32-bit) and running the executable file.
  4. Configuration Options During Installation:

    • Users are presented with configuration options during installation, such as installing the launcher for all users and adding python.exe to the PATH.
    • Optional features, including documentation, pip, tcl/tk and IDLE, and the Python test suite, are available for customization.
  5. Advanced Options:

    • The article covers advanced options like installing for all users, associating files with Python, creating shortcuts, and adding Python to environment variables.
    • Users are advised to make note of the Python installation directory for future reference.
  6. Verification of Installation:

    • The article guides users on verifying the Python installation through the command line or the Integrated Development Environment (IDLE).
    • The command python --version is suggested to check the installed Python version.
  7. Conclusion:

    • The tutorial concludes by affirming the successful installation of Python on Windows 10.
    • Users are encouraged to start coding in Python using IDLE or their preferred code editor, marking the beginning of their Python programming journey.

In summary, this article serves as a comprehensive guide for installing Python on Windows 10, catering to both beginners and seasoned developers looking to leverage Python's capabilities across various domains.

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

FAQs

How to Install Python on Windows 10 | DigitalOcean? ›

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 make sure Python is installed on Windows? ›

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.

Should I use admin privileges to install Python? ›

Even by default the Python installer for Windows places its executables in the user's AppData directory, so that it does not require administrative permissions, but if you are the only user on the system, you might want to place Python in a higher-level directory, e.g. C:\Python312 , to make it easier to find (Yegulalp ...

How to install Python full package? ›

Installing Python Packages with Setup.py

To install a package that includes a setup.py file, open a command or terminal window and: cd into the root directory where setup.py is located. Enter: python setup.py install.

How do I run a Python program on Windows 10? ›

To start a Python interactive session, or REPL, open a command-line window, type in the python command, and then press Enter . These steps will take you into the Python interpreter, which looks something like the following: Windows.

Can I download Python for free? ›

Yes. Python is a free, open-source programming language that is available for everyone to use. It also has a huge and growing ecosystem with a variety of open-source packages and libraries. If you would like to download and install Python on your computer you can do for free at python.org.

How do I know where Python is installed Windows 10? ›

Type 'Python' in the Windows Search Bar. Right-click on the Python App, and then select “Open file location“ Right-click again on the Python shortcut, and then select “Open File Location“

Which version of Python is best for Windows 10? ›

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.

Why Python is not installing in Windows 10? ›

The Python setup may fail if you don't have Windows Service Pack 1 (SP1) installed on your computer. It is a requirement for installing Python. Download Windows Service Pack 1. If it states an unspecified error, try downloading KB2999226.

Should I install Python from Microsoft store? ›

The full installer contains all components and is the best option for developers using Python for any kind of project. The Microsoft Store package is a simple installation of Python that is suitable for running scripts and packages, and using IDLE or other development environments.

Top Articles
Latest Posts
Article information

Author: Fr. Dewey Fisher

Last Updated:

Views: 6181

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Fr. Dewey Fisher

Birthday: 1993-03-26

Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

Phone: +5938540192553

Job: Administration Developer

Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.