Register Login

How to Install Python in Windows 8 and 10

Python is well-known for its unique combination of object-oriented structure and straightforward syntax. Programmers can use this interpreted language in different operating systems. Here programmers do not have to learn how to compile your code into machine language.

Python can be installed and used on almost any computer and OS. In this article, you will learn how to install Python in Windows 8 and Windows 10. Also, this article discusses how to verify the installation at every step.

Select the Python Version to Install:

There are many versions of Python available. To select a specific version of Python, use the python3 command or python3.7 as a standard. The py.exe launcher will choose the latest version that you have to install. You can use Py --list to see which versions are available or py -3.7 to select a specific version. The latest version is Python 3.10.4.

Download Python Executable Installer:

Following are the steps to download Python executable installer:

1. To install Python, choose a version (Python 3.10.4). Python has many versions, each with its syntax and way of doing things. We should choose which version we wish to use.

2. Now, we will download the Python executable installer. When you click download, a list of available executable installers with different operating system requirements will appear.

3. Run the installer. Select both the checkboxes (to install launcher for all users and add a PATH setup automatically) before clicking Install New. The installation process begins when you click the Install Now button.

Verify Python is installed or not:

Follow the steps below to see if Python is installed on your system:

  1. Open a command prompt window.
  2. Enter 'python' into the search box.
  3. If you have installed Python on your windows, you will see the name and version of Python on your start screen something like this.

4. Open the cmd and type py --version. The cmd will show you the Python version of Python installed. Otherwise, it will inform you that your desktop doesn't have Python.

py --version

Install PIP (Python Installer Package):

pip is a powerful software package management system for Python, so double-check that it is installed.

  1. Open a command prompt window.
  2. If you want to check if your desktop has pip, enter pip -V
  3. The following output will appear after installation.
pip -V

Verify pip is Installed

Pip displays a list of installed packages. Both pip list and pip freeze produce a list of installed packages, but the output is formatted differently. pip list will show you all of the packages you have installed (regardless of how they were installed). pip freeze will only show you what Pip has installed.

To verify pip is installed or not, follow these steps:

1. To open a command prompt, type cmd into the Start menu's search bar and then select Command Prompt:

2. To check for Pip installation, in the command prompt, type the following command and press enter.

pip --version

3. You'll see a version number like this if pip is installed and working: (pip 9.0.1)

4. If you have, you can use pip to install any Python module you want by typing the following (replace name-of-module with the name of your module) into a command prompt:

For example, to install Pandas, you will have to write:

Adding Python Path to Environment Variables is Required

The PATH variable is a directory that contains the command's executable file. When we enter the command into the Windows command prompt, it looks in the PATH variable for an executable file with the same name as the command. If the required file is not there, it displays an error message stating that the command was not recognized.

You can setup/add the complete path to python.exe by:

1. Go to Properties by right-clicking “This PC”.

In the left menu, click on Advanced system settings.

2. On the bottom right, click the Environment Variables button.

3. In the System variables section, select the Path variable and choose Edit. All of the repositories in the PATH variable are displayed on the next screen.

4.  Select New and enter the Python installation directory.

Conclusion:

We hope this article has given you a crisp idea of how to install Python in Windows 8 and 10. The steps are same for both the operating system versions. Also, after every step, you can verify the progress of your installation.