If you are aspiring to become a developer or want to automate repetitive tasks, Python is an excellent programming language to learn. It is easy to grasp, versatile, and extensively used in various fields, including web development, data analysis, artificial intelligence, and more. In this guide, we will walk you through the steps to install Python and Pip on Microsoft Windows.

Why Choose Python?

Python is renowned for its simplicity and readability, which makes it ideal for beginners. Additionally, its vast collection of libraries and frameworks enables you to achieve more with fewer lines of code. With the language's ever-growing community, you are never far from finding help or resources.

Before You Begin

Before proceeding with the installation, it's essential to note that Python has an official document that guides you through the installation process. This guide will provide a more detailed walkthrough to ensure a smoother experience, especially for beginners.

Installing Python 3 on Windows

Downloading the Installer

First, visit Python’s official download page to get the installer. Ensure you download the version compatible with your Windows operating system (32-bit or 64-bit).

Python’s official download page

Running the Installer

Once the download is complete, locate the installer and double-click to run it.

Install Python 3

Choose a directory for Python installation. In this guide, we will install Python to C:\Python37.

Add this directory, C:\Python37, to the Windows environment path to allow the system to recognize Python commands from any location.

Installing Pip

Pip is Python's package manager, which helps in installing and managing Python libraries. If you are using Python 2.7.9 or later, or Python 3.4 or later, Pip is installed automatically. However, if you have an older version of Python, you'll need to install Pip manually.

Downloading get-pip.py

Download get-pip.py by visiting the following link:

https://bootstrap.pypa.io/get-pip.py

Install Pip

Open your command prompt and navigate to the directory where get-pip.py is located. Type the following command and press Enter:

python get-pip.py

file

Pip will be installed in the Scripts directory.

file

Add this directory C:\Python37\Scripts to the Windows environment path.

Configuring Environment Variables

The Python and Pip directoies should be listed in PATH just look like the below.

file

This step is crucial for Python and Pip to work properly. Add the directories to the PATH variable:

PATH

setx /M PATH "%PATH%;C:\Python37;C:\Python37\Scripts"

PYTHONPATH

setx /M PYTHONPATH "C:\Python37;C:\Python37\DLLs;C:\Python37\lib;C:\Python37\lib\plat-win;C:\Python37\lib\site-packages"

Done. You have successfully installed Python and Pip on your Windows system. You are now ready to embark on your Python programming journey. Keep experimenting, and never hesitate to seek help from the Python community. Happy coding!

Last modified: June 19, 2023

Author

Comments

Write a Reply or Comment

Your email address will not be published.