Home > Windows

Fix: pip is not recognized as an internal or external command

In this guide, we will show you the steps to fix the ‘pip’ is not recognized as an internal or external command error. While I am usually not into the coding domain, but as of late quite a lot of Android tweaks are asking for Python. For example, some OEMs ships their firmware in a payload.bin file [READ: How to Extract payload.bin and get stock boot image file] or others in OZIP format [READ: How to Extract OZIP Realme Stock ROM (Firmware)]. These file-types couldn’t be extracted normally via the WinZip or WinRAR tools. For this, we need a decrypt batch tool and of course Python.

Apart from that, there has been a new tool in town for Samsung devices that is able to directly download the official OTA from the Samsung servers. For the unawares, the South Korean OEM doesn’t have any site where it officially uploads their firmware, so users are left with no choice but to take these unofficial tools (most of which are open source and their complete source code is right there on the GitHub repository). So all these types of tasks required Python and a few other tools.

But unfortunately, due to the initial lack of knowledge about the Python, I always messed up a few steps and ended up with the ‘pip’ is not recognized as an internal or external command error. But not anymore. I did extensive research on this topic and found out the right fix for this issue. Do keep in mind that although the fix is just one, there are many different ways of achieving the said tasks. With that said, here are the five different methods to fix the aforementioned error. Follow along.

How to Fix ‘pip’ is not recognized as an internal or external command

Given below are five different types of fixes. The first one will make use of the setx command which the first time users might find a little bit hard to digest. In the next method, I have incorporated a little bit of GUI for the ease of executing the steps. The third one is the manual approach of rectifying thus issues. Then in the fourth method, we will show you how to have shared a handy tip as well that deserves your attention. Finally, the fifth and final approach calls for the re-installation of Python, but with a twist!

With that said, I have personally tried the first three, and the fifth method and managed to fix out the ‘pip’ is not recognized as an internal or external command error. Personally, I have tried my level best to explain in a detailed manner as possible. Furthermore, I have also added screenshots of near about every step. This shall help our readers in their quest to fix this issue. Without further ado, let’s get on with the guide.

FIX 1: Adding the Path via setx Command

  1. The first fix calls you to add the path of your pip installation to your PATH system variable. By default, PIP is installed to

    python scripts

  2. Furthermore, PIP now comes pre-installed with newer builds of Python. You could check the same by launching the Command Prompt window as an admin and then typing in the below command
    pip help

    pip help

  3. This should list out a long list of commands, signifying that PIP has been successfully installed.
  4. Moving on, since PIP is installed in C:\Python34\Scripts\pip directory, hence the path “C:\Python34\Scripts” needs to be added to your PATH variable.
  5. To check if it hasn’t already been added to the PATH, execute the following command in the CMD Window:
    echo %PATH%

    echo path python

  6. If it isn’t installed, then you could add the path of your pip installation to your PATH variable by using the setx command as follows:
    setx PATH "%PATH%;C:\Python34\Scripts

FIX 2: Adding the Path via GUI

If the above fix was too much to digest, then here I am presenting that above section in a slightly more generalized form. In this section, we will again show you the steps to Add Python to environment variables but would be taking the route that involves a user interface (and not any set of commands as such). Here are the steps in this regard to fix the ‘pip’ is not recognized as an internal or external command:

  1. Use the Windows+R shortcut key combinations to launch the Run dialog box.
  2. Type in appwiz.cpl and hit Enter. This will launch the Programs and Features page.
  3. Scroll to the Python application, right-click on it, and select Change.
    python program and features
  4. Then select the Modify option.
    python modify setup
  5. Tick mark the pip option and click Next. Follow the on-screen instructions to install it.
    python setup add pip

With this, you have successfully added Python to the Environment variables using a handy graphical user interface. This in turn will fix the ‘pip’ is not recognized as an internal or external command error.

FIX 3: Manually Adding the Path to the Environment Variables

In this section, we will be manually adding the location of the downloaded Python to the Environment Variables. Here are the required steps for the same:

  1. Launch the File Explorer on your PC and double-check that the following directory exists (just replace the username with your name and the Python version accordingly):

    python scripts

  2. Now copy this location and launch Control Panel from the Start menu
  3. Then head over to System and Security > System. Then click on Advanced System Settings from the left menu bar.
    advanced system settings
  4. Now the System Properties dialog box will appear, click on Edit Environment Variables.
    PIP environment variables
  5. There will be two boxes, the upper one will be for the user and the lower one for the system. In the upper user box, select the Path variable and click on the Edit Button located just at the bottom right of that box.
    add python PIP environment variables
  6. Now click on New and then paste the directory of the Scripts folder that you had copied earlier. Finally, click on OK on all the opened dialog boxes to save the changes and to close them as well.

With this, you have dealt with the ‘pip’ is not recognized as an internal or external command error. Here is the fourth and final thing that we would like to draw your attention to.

FIX 4: Use the py -m command

  1. Let’s say you have the pip and py installed, but you don’t want to add the PATH as explained above.
  2. In that case,  to execute pip as your command then you can do that using the py -m as a prefix. In that regard, you could take this as the syntax:
    py -m <command>
  3. For example:
    py -m pip install --upgrade pip setuptools

FIX 5: The Nuclear Approach (via Python Setup)

If none of the above methods managed to fix up your issues, then this last method will definitely do the job for you. In this, we will be uninstalling python from your PC and then re-installing. But in between that, we would explicitly instruct Python to add the PIP installation to your PATH system variable. It will do so and then install Python on your PC. And this should fix the ‘pip’ is not recognized as an internal or external command error as well. here are the required steps for the same:

  1. Go to the Programs and Features page. There are many approaches for that, the easiest of which is to execute the appwiz.cpl command in the Run window (launch it via Windows+R shortcut).
  2. Once you reach there, select Python, right-click on it, and select Uninstall. Follow the on-screen instructions to completely remove this application from your PC.
  3. Once that is done, download Python from its official website.
    install python windows 10
  4. Launch the Python EXE file to bring up the installation menu.
  5. In the first menu that appears, tick-mark Add Python <version> to PATH and click on Customize Installation.
    add python to path option
  6. Now select both the PIP and PY launcher option and hit Next.
    pip py python
  7. Browse to the location where you want to install Python or leave it as it is for the default installation directory (recommended).
  8. Finally, hit the Install button and wait for the process to complete. Once that is done, your stands would be rectified. You could launch CMD as an Admin and execute the below command to verify the same:
    pip help

    pip help

That’s it. These were the different approaches towards fixing the ‘pip’ is not recognized as an internal or external command error. As I have stated initially, I have recently started with Python, hence if you find any errors in my above explanation, do let me know in the comments. Likewise, if you have any queries concerning the above steps, let me know in the comments. I will try my best to address and respond to all your queries. Peace!