How to Install Pip on Windows (With Photos)

How to Install Pip on Windows

How to Install Pip on Windows (With Photos)

If you’ve set up any development environment before, you probably know that the process can be quite a head-scratcher. Whether you’re a seasoned developer or a newbie, there’s almost always some hassle involved. Enter package managers, the holy grail of installing and managing software packages. For Python developers, PIP is the go-to package manager for installing external libraries and dependencies. 

Short for “Pip Installs Packages,” PIP allows you to easily download, install, upgrade, and uninstall packages written in the Python programming language. It’s a must-have tool that ensures you always have the latest version of any package you need, saving you time and effort.

In this article, we’ll show you how to install PIP (the latest version) on your Windows machine, complete with photos and tips for troubleshooting those pesky installation errors.

Prerequisites for Installing PIP on Windows

Before we start the installation process, there are 3 important things you need to have in place first:

  • A Windows machine, of course
  • A working internet connection
  • Python installed on your computer

Step 1: Verify Python Installation

Let’s make sure Python is up and running on your machine before we start with the PIP installation process. To do this, we’re going to use the trusty Windows command prompt. 

Just type in “cmd” in the Windows search bar and hit Enter, and the command prompt should pop up. 

how to install pip on windows

Running the command prompt.


Once you’re in, type in “python –version” and hit Enter again. If you see a version number show up, congratulations! You’ve got Python installed and you’re good to go. 

how to install pip on windows
Typing in “python –version.”


But if you get an error message or nothing shows up at all, it means you will need to download and install Python before proceeding. Don’t worry, though — it’s an easy process. Simply go to the official Python website and download the latest version or the one most compatible with your Windows machine.

Once downloaded, run the installer and follow the on-screen instructions to install Python on your machine. After the installation is complete, open the command prompt and type “python –version” as we did before to confirm that Python is installed correctly.

It’s worth noting that if you’re using Python versions 3.4 and above, or Python2 version 2.7.9 and above, you need not worry about installing PIP separately; unless you’re sure PIP doesn’t exist in your setup. That’s because these versions of Python already come bundled with PIP. If unsure, run “pip –version” to confirm.

how to install pip on windows
Confirming that PIP is installed.


However, if you’re using an older version of Python or a different operating system, you’ll need to install PIP separately. So, if that’s the case, let’s carry on with the step-by-step installation process.

Step 2: Download PIP Installation Script

Now that you’ve got Python up and running, it’s time to get your hands on the PIP installation script. Simply head over to https://bootstrap.pypa.io/get-pip.py, PyPA’s (Python Packaging Authority) PIP installation page on your web browser, and PIP will be downloaded automatically for you. 

On some browsers, especially Chromium-based ones, the script might open as a text file. 

how to install pip on windows
Opening PyPA’s installation page.


Just copy all the text into a Notepad text file and save it as “get-pip.py,” and you’re ready to move on to the next step.

how to install pip on windows
Saving the text file as “get-pip.py.”


Step 3: Run PIP Installation Script

On to the all-important step of actually installing PIP! Open up the Windows command prompt again and navigate to the folder where you saved the “get-pip.py” file. You can do this by typing “cd,” followed by the folder path, and press Enter.

For instance, if you saved the file to the Downloads folder, type “cd C:\Users\{YourUsername}\Downloads,” without the curly brackets, and press Enter.

Once you’re in the correct folder, it’s time to run the installation script. Type “python get-pip.py” and hit Enter.

how to install pip on windows
Typing in “python get-pip.py.”


Alternatively, you can use Windows Explorer to navigate to the location of the get-pip.py file and right-click on it. From the dropdown menu, select “Open with…” and then choose “Python” from the list of available programs. 

how to install pip on windows
Selecting Python.


Either way, the installation script will begin running and initiate the PIP installation process. Once it’s complete, you should see a message indicating that PIP has been installed successfully.

how to install pip on windows
Confirming that PIP has been successfully installed.


And as easy as that was, you now have Python’s most trusted package manager installed in your Windows development environment. We can now start using it to grab other Python packages from PyPI. But before that, let’s add PIP to the Windows Environment Variables.

Step 4: Add PIP to Windows Environment Variables

Adding PIP to your Windows environment variables will allow you to run PIP from any command prompt without navigating to the directory where PIP is installed. It’s a simple and straightforward process. 

You can access the “Environment Variables” menu by searching for it in the Start menu and pressing Enter. Click on “Environment Variables” in the subsequent window.

how to install pip on windows

Selecting “Environment Variables.”


Once you have it open, find the “Path” variable under the System Variables section, and click “Edit.”

how to install pip on windows
Clicking on “Edit.”


In the next window, click “New” and then enter “C:\Users\{YourUserName}\AppData\Local\Programs\Python\PythonXXX” (where XXX is the version number of Python that you installed) or the folder in which you installed Python. 

how to install pip on windows

Selecting “New.”


Finally, click “OK” to save the changes and close the rest of the windows. With PIP now added to your environment variables, you don’t need to worry about navigating to the PIP installation directory every time you need to use it.

To confirm everything now works as perfectly as it should, let’s download a sample package quickly to ensure PIP is correctly installed and working perfectly. Type “pip install tensorflow” in cmd.

This will initiate the download and installation of the TensorFlow package. TensorFlow is a Google-developed open-source library for machine learning and deep learning tasks. It offers a comprehensive set of tools for building and training models, and supports a wide range of devices, including GPUs.

After some time downloading and installing the required dependencies, we get the following, which confirms PIP is properly installed and everything went well!

how to install pip on windows
Checking that PIP is working correctly.


This means you can now even start building and training machine learning models like DALL·E 2 using TensorFlow in your Windows environment, taking full advantage of your GPU, if available.

In the following video, MakeUseOf demonstrates how to install PIP for Python after verifying that it isn’t already installed on your Windows machine.

Troubleshooting PIP Installation

If you encounter any errors or problems during the installation process, don’t fret! Here are some common installation errors and tips to help you get PIP installed successfully. 

Common Installation Errors and How to Fix Them

If you encounter any errors during the installation process, don’t worry. Here are a few common errors and their solutions:

  • Python is not recognized as an internal or external command.” This means that Python wasn’t added to your system’s PATH variable correctly. To fix this, make sure to follow the above steps keenly.
  • SyntaxError: invalid syntax.” This error occurs if you mistype a command or use the wrong syntax. Check the command you’re typing and try again.
  • Permission denied.” This error can occur if you don’t have sufficient permissions to run the command. Try running the command as an administrator.
  • No module named pip.” This means you need to upgrade your Python version. To do this, download the latest version from the official Python website and install it.

Tips to Ensure Successful Installation

To ensure a successful installation, make sure to follow these tips:

  • Always run the command prompt as an administrator.
  • Make sure you have a stable internet connection.
  • Should you encounter any errors during installation, make sure to read through them carefully and take note of any details they provide — these details can be invaluable when troubleshooting common issues!
  • If you encounter any error you can’t resolve, you might want to consider getting help from a Python community forum.

Final Thoughts

If you’re new to Python, installing PIP on Windows may seem daunting at first, but don’t let that intimidate you! This step-by-step guide and troubleshooting tips should be more than enough to let you install PIP on Windows in no time. 

So, with PIP installed, you now have access to a vast library of Python packages and modules that can help you enhance your Python projects and streamline your workflow. From data analysis to web development and beyond, it’s your world, and the possibilities are endless. Happy coding!

Frequently Asked Questions

How can I upgrade PIP on Windows?

You could use the command “python -m pip install –upgrade pip” in your command prompt or terminal. This will download and install the latest version of PIP available. If you encounter any permission issues while upgrading, you can try running the command prompt as an administrator.

How do I check my PIP version?

You can simply type the command “pip –version” in your command prompt and then press Enter.

How do I install a specific version of a Python package with PIP?

To install a specific version of a package with PIP, you can use the following command: “pip install <package_name>==<version_number>”. For example, to install version 2.11.0 of the keras package, you would use the command “pip install keras==2.11.0”.

How do I uninstall a package using PIP?

Use the following command: pip uninstall <package_name>. For example, if you want to uninstall the idna package, you would run the command “pip uninstall idna”.

You can also specify a specific version of the package to uninstall by appending ==version_number to the package name. The full command would thus be “pip uninstall idna==3.4”.

How do I list all the packages installed using PIP?

To list all the packages installed using PIP, use the following command “pip list”. This will show a list of all the packages installed, along with their version numbers and any dependencies.

To top