How to Install Python on Windows 10

How to Install Python on Windows 10

Python is a programming language gaining popularity among both novices and seasoned developers. Its adaptability and versatility make it a valuable tool for scripting, automation, data analysis, machine learning, and back-end development.

This tutorial will guide you through installing Python on Windows 10 using the dedicated Python installer designed for the Windows operating system.

Requirements:

Ensure you have a Windows 10 computer with administrative privileges and an active internet connection.

Step 1 — Downloading the Python Installer:

1. Go to the official Python download page for Windows. https://www.python.org/downloads/windows/

2. Locate a stable release of Python 3. For the purposes of this tutorial, Python version 3.10.10 was utilized during testing.

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

Step 2 — Running the Executable Installer

1. Once the installer has been downloaded, double-click the .exe file, such as python-3.10.10-amd64.exe, to initiate the Python installer.

2. Check the box labeled “Install launcher for all users.” This will grant all computer users access to the Python launcher application.

3. Check the option “Add python.exe to PATH.” This will allow users to launch Python directly from the command line.

4. If you’re new to Python and wish to proceed with the default features outlined in the dialog, click “Install Now” and Step 4 – Verify the Python Installation. For additional advanced features, opt for “Customize installation” and proceed accordingly.

5. The Optional Features encompass prevalent tools and resources for Python, and you can install all of them, even if you don’t anticipate utilizing them.

Choose any combination of the following options:

Documentation: advisable

pip: advisable if you intend to install additional Python packages, like NumPy or pandas

tcl/tk and IDLE: advisable if you anticipate using IDLE or following tutorials that employ it

Python test suite: advisable for testing and learning purposes

py launcher and for all users: advisable for enabling command-line access to Python for all users

6. Click Next.

7. The Advanced Options dialog will appear.

Choose the options that align with your needs:

Install for all users: It is advisable if multiple users share this computer

Associate files with Python: advisable; this associate all Python file types with the launcher or editor

Create shortcuts for installed applications: advisable for convenient application shortcuts

Add Python to environment variables: advisable for launching Python

Precompile standard library: unnecessary; it may prolong the installation

Download debugging symbols and Download debug binaries: advisable only if creating C or C++ extensions is part of your plan. Take note of the Python installation directory, as you may need to refer to it later.

8. Click Install to start the installation.

9. After the installation, a successful Setup message displays.

Step 3 — Adding Python to the Environment Variables (optional)

You can skip this step if you choose to include Python in your environment variables during installation.

However, if you wish to access Python from the command line and did not add it to your environment variables during installation, you can perform this manually.

Before proceeding, locate the Python installation directory on your system. The following directories serve as examples of default directory paths:

 C:Program FilesPython310: The directory will be system-wide if you choose “Install for all users” during installation.

C:UsersSammyAppDataLocalProgramsPythonPython310: If you didn’t select “Install for all users” during installation, the directory will be in the Windows user path.

Please note that the folder name may vary if you install a different version, but it will still begin with “Python.”

Here’s how to proceed:

1. Open the Start menu and type “advanced system settings” in the search bar.

2. Click on “View advanced system settings.”

3. In the System Properties dialog, go to the Advanced tab and then click “Environment Variables.”

4. Depending on your installation:

If you chose “Install for all users” during installation, select “Path” from the list of System Variables and click “Edit.”

If you did not select “Install for all users” during installation, select “Path” from the list of User Variables and click “Edit.”

5. Click “New,” enter the path to the Python directory, and then click “OK” until all the dialog boxes are closed.

Step 4 — Verify the Python Installation

You can confirm the successful installation of Python via the command line or the Integrated Development Environment (IDLE) application if you opted to install it.

Follow these steps:

1. Open the Start menu and type “cmd” in the search bar. Click on “Command Prompt.”

2. In the Command Prompt window, enter the following command:

Python –version

An example of the output is Python 3.10.10

You can also verify the Python version by launching the IDLE application. Follow these steps:

1. Open the Start menu and type “python” in the search bar.

2. Click on the IDLE app, such as “IDLE (Python 3.10 64-bit),” that appears in the search results. This will open the IDLE environment.

3. you will see the Python version in the IDLE shell window once the IDLE opens.