Sep 30, 2023 6 min read

How to Install Python on Windows 10

Install Python on Windows 10 with our step-by-step tutorial. Python is a popular language known for its simplicity and readability.

Install Python on Windows 10
Table of Contents

Introduction

Before we begin talking about how to install Python on Windows 10, let's briefly understand – What is Python?

Python is a widely-used programming language known for its simplicity and readability. It offers a versatile platform for building a variety of applications, from web development to data analysis and artificial intelligence.

Python's clear syntax and extensive libraries make it an ideal choice for beginners and professionals alike. With its modular design and object-oriented approach, Python empowers developers to write efficient and elegant code. Discover the power of Python and unlock endless possibilities for your next project.

💡
Note: Check out How To Install Python 3 and Set Up a Local Programming Environment on Windows 10 if you're interested in learning how to use Windows PowerShell and package managers, as well as how to install and configure Python using a command-line interface on Windows 10.
💡
Note: Microsoft advises using the Windows Subsystem for Linux to install Python if you want to use it for web development.

Advantages of Python

  1. Easy to learn: Python's simple syntax and clear structure make it beginner-friendly.
  2. Versatile applications: Python excels in various fields like web development, data analysis, and AI.
  3. Rich library ecosystem: Python offers numerous libraries to extend functionality and reduce development time.
  4. Improved productivity: Python's readable code and vast community support enhance development efficiency.
  5. Portability: Python code can run on multiple platforms, making it convenient for cross-platform applications.

Prerequisites

An internet connection and a machine running Windows 10 with administrative privileges are essential.

Step 1 — Downloading the Python Installer

1) Visit the official Python download page for Windows.

2) Find a reliable Python 3 release. Python 3.10.10 was used to test this tutorial.

3) To download the executable file, click the link that corresponds to your system: Windows installer (64-bit) or Windows installer (32-bit).

Step 2 — Running the Executable Installer

1) Double-click the .exe file, such as python-3.10.10-amd64.exe, to launch the Python installer after downloading it.

2) To give all users of the computer access to the Python launcher application, select the Install launcher for all users checkbox.

3) Users can run Python from the command line by checking the Add python.exe to PATH checkbox.

4) Click Install Now and go to Step 4—Verify the Python Installation if you're just getting started with Python and wish to install it with the default features specified in the dialogue. Click Customize installation and proceed on to install any more optional or advanced features.

5) Even if you don't intend to use all the resources and tools listed under the Optional Features, you can still install them all.

Select any one or more options given below:

  • Documentation: advised
  • pip: highly advised if you wish to set up other Python packages like NumPy or pandas.
  • tcl/tk and IDLE: advised if you want to use IDLE or adhere to instructions that do so.
  • Python test suite: suitable for testing and learning.
  • py launcher and for all users: recommended so that users be able to launch Python from the command line.

6) Select Next.

7) The Advanced Options window appears.

Select the options that most closely match your requirements:

  • Install for all users: advised if you're not the only user using this machine.
  • Associate files with Python: advised to choose this option, as it links the launcher or editor to all Python file types.
  • Create shortcuts for installed applications: advisable to enable shortcuts for Python applications.
  • Add Python to environment variables: advised to enable Python launch.
  • Precompile standard library: not necessary, it could cause the installation to crash.
  • Download debugging symbols and Download debug binaries: only advised if you want to create C or C++ plugins.

Make a note of where Python is installed in case you need to refer back to it in the future.

  • To begin the installation, click Install.
  • A message stating "Setup was successful" appears following installation completion.

Step 3 — Including Python in the Environment Variables (optional)

If you selected Add Python to environment variables at the time of installation, you can skip this step.

Adding Python to your environment variables manually is still an option if you wish to use Python from the command line, but didn't do so during installation.

Find the Python installation directory on your system before you begin. Given below are the examples of the default directory paths:

  • C:\Program Files\Python310: The directory will be accessible to all users if you chose Install for all users during installation.
  • C:\Users\Sammy\AppData\Local\Programs\Python\Python310: The directory will be in the Windows user path if you didn't choose Install for all users during the installation.

The folder name will vary if you installed a different version, but it will still start with Python.

1) Enter advanced system settings in the search box at Start.

2) Select View the advanced system settings.

3) Click the Advanced tab in the System Properties dialogue, then select Environment Variables.

4) Depending on the installation:

  • Choose Path from the list of System Variables if you selected Install for all users during installation, then click Edit.
  • Choose Path from the list of User Variables and click Edit if you did not select Install for all users during installation.

5) After selecting New and entering the Python directory path, click OK to close all dialogue boxes.

Step 4 — Verify the Python Installation

If you decided to install the Integrated Development Environment (IDLE) application, you can use that to check whether the Python installation was successful.

Enter cmd in the search box under Start. Select Command Prompt.

In the command prompt, enter the below command:

python --version

One example of the output is:

Output
Python 3.10.10

By using the IDLE application, you may also check the version of Python. Enter python in the Start search bar and then select the IDLE application, for instance IDLE (Python 3.10 64-bit).

Using IDLE or any code editor of your choosing, you can begin programming in Python.

FAQs to Install Python on Windows 10

Can I have multiple versions of Python installed on Windows 10? 

Yes, multiple Python versions can coexist on Windows 10. Each installation will have its own set of libraries and applications.

How do I update Python on Windows 10?

Download the latest Python installer from the official website and run it. Python will be updated to the new version while preserving your existing libraries.

What is the recommended editor for writing Python code on Windows 10? 

There are several popular editors available, such as Visual Studio Code, PyCharm, and Atom, that provide excellent support for Python development.

How can I set up a virtual environment for Python on Windows 10? 

Install the "virtualenv" package using pip. Then, in the command prompt, navigate to your desired project directory and run "virtualenv env" to create a virtual environment.

Can I install third-party libraries and packages in Python on Windows 10? 

Yes, you can install additional packages using pip, the Python package manager. Simply run "pip install package_name" in the command prompt.

Are there any alternatives to installing Python directly on Windows 10?

Yes, you can use Anaconda distribution, which is a popular Python distribution that comes with many pre-installed scientific packages and environments.

Can I install Python using the Microsoft Store on Windows 10? 

Yes, Python is available on the Microsoft Store. You can install it directly from there, ensuring an easy and hassle-free installation process.

Conclusion

You've installed Python on your Windows 10 PC and are ready to begin learning and programming in Python. Then you can continue learning with other Python tutorials after creating your first program in Python 3.

If you have any queries or doubts, please leave them in the comment below. We'll be happy to address them.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.