Are you trying to download Python packages using PIP but PIP not recognized as command? This guide will help you out!
Python is a programming language comprising a multitude of components from a plethora of sources. While the initial download packs all the essential ingredients, you will need the help of customized libraries sooner or later 🙃. However, downloading these libraries through PIP can admittedly turn out to be a significant hassle.
To solve this, you try to enter PIP upgrade queries — but the error seems persistent. Exactly what in the binary is going on?! 🤯
According to StackOverflow, your Python library must be globally accessible by every process. Otherwise, your IDE might not detect a complete installation of Python — even when the terminal shows a different story.
Therefore, it’s essential to look at and potentially resolve the following issues to ensure your PIP runs smoothly:
- Making the entire Python installation global.
- Fixing the incorporation of your PATH with the foundation.
- Upgrading or reinstalling Python to get rid of possible file corruption.
With that said, this article will primarily focus on making your Python installation global, along with trying a few known remedies that can get rid of the ‘PIP’ Not Recognized as an Internal or External Command error 🤓.
Table of Contents
How To Add Python Installation To Path?
1. Verifying the Existence of the Path
The first step is ensuring that the issue lies within your PATH configuration. You can do this by looking for the existence of the PIP foundation in PATH.
You can do this by implementing the following steps:
- For starters, press the Windows key to open the Start Menu and type in the following in the search bar:
- Next, open the Edit the system environment variables and Environment Variables… within the window.
- From there, choose Path, and check for the Path to your PIP foundation folder. By default, it should look something like this:
If such a path exists, then consider moving on to the fixes. Otherwise, you need to manually add it such that PIP can be accessible to the interpreter. 🤔
2. Finding Your Installation’s Path
If you can’t find a proper Path to the installation, it’s time to manually add it to the system’s Path Environment Variable.
Here’s how you can find your Python installation for the PIP foundation Path:
- To start, open File Manager and head to the drive where you’ve installed Python. By default, it is the C Drive.
- Now, go to the search bar on the top-left corner, type Python, and press Enter.
- Look for a filename configured in the following format:
For example, Python version 3.10 will have Python310 as the folder name.
- Next, open the file, and find and open the Scripts folder.
- Lastly, press the Path slider on the top and copy the Path for later use.
3. Adding PIP to the Path
Once you have the Path to your PIP folder, it’s finally time to add it to your growing list of System Environment Variables. Doing this will allow your Python Interpreter to access PIP globally. 😉
With that out of the way, here’s how you can add PIP to the System Environment Path:
- First, follow the same steps under the Verifying the Existence of the Path section until Step 2.
- Next, press the new button, and paste the path you copied in the Finding Your Installation’s Path section.
- Lastly, press Enter and click OK to save your settings; you’re pretty good to go! 😎
How To Repair the Python Installation?
1. Download the New Python File
You need to download a new copy of Python before anything else. This is because you might no longer have the installation file, or the previous installer in itself might’ve been corrupted 🧐. Besides, it takes little to no space, so you might as well not risk it.
That said, you can download an official copy of Python from here.
Just click the download button, choose the download location, and you’re pretty much done with this part 😃.
2. Repairing Python on a PC
Once you’ve downloaded the installer, it’s time to launch and complete the setup wizard 🦾. With that said, here’s what you need to do:
- To get started, open your download folder, and launch the Python.exe installation file.
- Since you have an existing installation of Python before, the installer will prompt you to choose from either modifying that, repairing the previous version, or uninstalling and reinstalling Python completely. 😁
- Press Repair, then hit Yes on the prompt, and wait for the progress bar to finish.
If the repair is successful, the installer will output a relevant prompt. However, you will be better off choosing the Uninstall option in the alternate case.
In essence, the only reason why PIP isn’t working is that the Interpreter cannot reach it. Your first choice of action should be to restart your computer. If that doesn’t work, then it’s time to roll up your sleeves and get down with the technical repair stuff. 😑
Luckily, you only need to add PIP’s path to the System Environment Variable, so other applications (including your interpreter) can access it.
Be sure to try the reinstallation method if simple repairing doesn’t do the job for you.
In case the mentioned examples don’t resolve the issue 🤨, try installing an older version of Python from the same website.
Lastly, let us know in the comments:
- Were you able to fix the ‘PIP’ is not recognized as an external or internal command issue?
- Have you been able to find a simpler be-all-end-all fix?
- Which kind of library are you trying to download using PIP?
- Are there any other points or useful information you believe we should’ve mentioned?
Feel free to share this article with your friends and peers, so they don’t have to rack their brains over this same PIP issue.