PiP is a recursive acronym for ‘PiP installs Packages.’ It is one of the most popular and remarkably used package management systems that will be beneficial for you to install as well as manage software packages that are written in the Python and found in PyPI (Python Package Index)
If you are familiar with Python, then you must have heard about “PiP Is Not Recognized” error. Users have informed that this issue kept occurring even after installing Python distribution and adding Python to the path variable.
Windows 7, 8, and 10 users have complained of encountering this error, which signifies that this error is not restricted to a specific OS. In this article, we are going to discuss PiP and some easy ways in which you can resolve “Pip is not recognized” error in brief.
Causes Related to “Pip is Not Recognized as an Internal or External Command” Error
Probably, now you got a clear idea regarding the ‘PiP Is Not Recognized’ error. On analyzing various user reports, we have found some reasons that cause this error in the first place. We have provided them below
PIP installation is not added to the system variable
To run Python commands from a cmd window, it is important that you add the path of your pip installation to the path of the system variable. If you have installed Python through an installation executable, then its addition should be automatic.
Incorrect addition of installation in your PATH
If you add PATH manually, then it is more likely to get messed up easily. Even a missing semicolon before the term PATH can cause this error. Thus, beware of any incorrect addition of installation in your PATH.
Now as you got a clear idea regarding the causes behind this error, let’s get into some of the easy ways in which you can resolve this error without any difficulty.
How Can You Fix ‘PiP Is Not Recognized’ Error?
While this error can be pretty bothersome for people who work with Python if you are facing this particular error on your PC, no need to worry. We have mentioned here some of the easy and efficient ways by which you can get rid of this “PiP is not recognized” error. So, let’s take a thorough look into them.
Method 1: Check Whether PiP is Added to Your PATH Variable
The first and foremost step includes checking whether the PIP installation is added to the PATH variable. However, if you don’t know, you can find that easily by using a command at CMD prompt.
If the path of your PIP installation is already added to your path variable, then move on to the next solution. To know how you can check if the PIP installation is present in the PATH variable, follow the steps cited below.
- Firstly, press both Windows key and R simultaneously to launch a Run dialog box. Now type, cmd and hit the Enter button. This will open a Command Prompt window.
- Now, type “echo %PATH%” within the Command Prompt window and press the Enter button to know the list of locations added to the PATH variable.
- However, if you found a path that is the same as “C:\Python37\Scripts”, then it is most likely that the installation path is added to the PATH variable. Hence, if such is the case then it is recommended to move straight to the methods by which you can troubleshoot problems associated with the PIP installation path.
If you still could not find the Pip Installation path, move to methods mentioned below.
Method 2: Utilize Windows GUI to Add PIP to the Path Environment Variable
Many times using windows GUI to add PIP to the Path Environment Variable has helped to solve the “PiP is not recognized” error easily. Here we have mentioned the steps by which you can add pip to the path environment variable.
- First of all, press both Windows key and R simultaneously to open the Run dialog box. Now, after that, type “sysdm.cpl” and then hit the Enter button. This will open the System Properties window for you.
- Within the System Properties screen, select the “Advanced tab” option and then “Environment variables.”
- Once the Environment variable window appears on your screen, go to System variables and then select the Path by clicking on it. With the chosen Path, click the Edit.. button.
- Now in the Edit environment variable window, tap on New and then add the path where Pip installation is present. If you are using Python 3.4, the location of it will be C:\Python34\Scripts.
- On adding the path, make sure to open a new CMD window and install a Python package that comes with it. After doing so, the “pip is not recognized as an internal or external command” may vanish.
In the next method, we have mentioned an easy and quick way to add Pip location to the environment variable
Method 3: Use CMD to Add PiP to the Path Environment Variable
If you want a quicker way to set up the PIP path environment variable then you can do so by utilizing the CMD window. This will be time-saving, although it can be intimidating if you are not used to using the terminal. Here is how to do it:
- First of all, press Windows+R to launch the Run dialog box and then type cmd. Now press Enter so that you can open a Command Prompt window.
- Within the Command prompt window, type the commands listed below.
setx PATH “%PATH%;C:\Python37\Scripts”
- If you are using some other version of Python, make sure to change the path after “;” sign, accordingly. The command provided above is for python 3.7.
- Now run a Python installation package from the same CMD window to see whether the fix was successful or not.
However, if you see that the error message still persists, follow the method explained next.
Method 4: Open the Python Package Without Adding the PiP Variable
You can utilize other commands if you are looking for a way to install a Python package without adding PIP to the path environment variable.
Here we have provided a few ways which can be utilized to open Python install packages in CMD without adding any PIP variable. It can be done in two ways and are as explained below.
- First of all, press the Windows key and R key simultaneously so that you can open a Run dialog box. Now type “cmd” and hit the Enter button so that you can open a Command Prompt window.
- Type the commands as cited below and change the name of the placeholder to your own package name.
python -m pip install [packagename]
Try the long method, if the short method does not work for you.
- First of all, open the Run dialog box by pressing Windows+R and then type cmd. Now hit the Enter button so that you can open a Command Prompt window.
- Now type the following command so that you can go to the location of python .whl file.
cd C:\python installs
Note: You may need to change ‘python installs’ to the folder name where the Python install package is located.
- After that, run the commands cited below. With this, you will be able to install the Python package using Pip.
c:\python37\scripts\pip.exe install [package].whl
If these methods did not resolve your issue, then follow the last method we have provided below.
Method 5: Make Sure that PiP is Included within the Python Installation
In various instances, it was seen that Python Installers leave PiP out of the default installation. However, the good news is, it can be rectified by modifying the Python installation to install Pip. Plunge into this quick guide to know-how.
- Press Windows +R so that you can launch the Run dialog box. After that, type “appwiz.cpl” and hit the Enter button. After doing so, “Program and Features” will open.
- In the Program and Features section, make sure to right-click on the Python installation and then select the “Change”.
- Now click on Modify on the Modify Setup window.
- Check the box related to PIP, in the Optional Features screen. Now click on Next.
- Click on the Install button to make changes to the Python installation.
- After a successful modification of Python installation, make sure to launch a CMD window and see if you are able to install a Python package with Pip without the “pip is not recognized as an internal or external command” error.
These solutions were beneficial for a large number of users and hopefully, they will help you get rid of this error without any hassle. Thus, please let us know your experience in the comment section below. Share the article if you liked it.