If you are a programmer Python, you may have already encountered this problem in the form of the message “pip' not recognized as an internal or external command”. Here are the complete instructions on how to fix the error in Windows 10.
When you try to install Python packages on Windows from the command line commands, you get an error message that pip is not recognized as an internal or external command. The most common solution suggested by many experts is reinstall packages from your Python distribution, but many users encounter the same problem even after installing the Python distribution.
The problem occurs not only in Windows 10 but also in Windows 7 and 8. According to many users, The problem is caused by corrupted Python packagesFirst, you need to understand what PIP is.
You can also read: 7 Solutions to Fix Error 0x80240017
What is PIP?
PIP is a complete way of pip package installation. It is a Python package management system for installing and managing software packages. If you encounter the same problem, Don't worry because you can easily fix it.
When you install Python, it may automatically set environment variables on Windows, but sometimes it doesn't. If you're not using the latest version of Python, download it, as recent versions, including 2.7.9 and later, include PIP by default. When I first started using Python and tried to install the package using pip from the Windows command line, I encountered the same problem.
Microsoft had announced that Python would be included in the next version of Windows Update. A user wrote that he is trying to install pyqt5, but it is not detected. I am trying to install pyqqt5 and I am getting an error message. I am using Visual Studio Code as my IDE. Many users have reported this issue on StackOverflow.
We have analyzed this issue and tried to resolve it. We have several solutions to resolve the “pipe is not detected as internal or external command” issue in Windows 10.
The only solution is to put the PiP installation path into a Windows system variable. If you installed Python via an executable, it should be added automatically. Here is a complete guide on how to do this. how to solve the problem of “pip” not being a recognized command.
What causes the error $0027pip$0027 not recognized as an internal or external command?
We have investigated this issue through several user reports and have tried to reproduce it on our own computers. According to our findings, several scripts may be causing this error message:
PIP installation does not add to system variable – To run Python commands from a window CMD, You must add the PIP installation path to the PATH in the system variable. If you installed Python via the installer, this should be added automatically.
The installation was not added to the PATH correctly – It is easy to mix up PATHs if you add them manually. An extra space or missing semicolon before the new PATH will cause an error.
If you are just trying to fix this specific error message that prevents you from using the Python command in CMD, follow the methods described in this article. All of the possible solutions listed below have been verified to have worked for at least one affected user.
For best results, follow the methods below in order until you find a solution that resolves the issue in your particular scenario.
Fix: PIP is not recognized as an internal or external command
Method 1: Check that PIP has been added to your PATH variable
Let's find this out first. If you don't know if PIP has been added to your PATH variable, you can easily check by using a special command at the CMD prompt. Knowing this can point you in the right direction and save you unnecessary steps.
Nota: If you already know whether the path to the PIP installation has been added to the PATH variable, proceed with the following methods.
Here's a quick guide on how to check if the PIP installation is already in your PATH variable:
- Press Windows key + R to open the Run dialog box. Then type “cmd” and press Enter to open a command window.
- In the command window, type echo %PATH% and press enter to get a list of all paths added to the PATH variable.
- If you find a path similar to C:\Python37Scripts (depending on your Python version), this means that The installation path has already been added to your PATH variableIn this case, you can skip the following methods and go directly to method 4, where we will start debugging the PiP installation path.
If you were unable to find the PIP installation path using the above test, continue with the following methods (method 2 and method 3) to add PIP to the PATH environment variable.
Method 2: Add PIP to the PATH environment variable using the Windows GUI
If method 1 shows that PIP is not set as an environment variable in PATH, and you already have a Python distribution installed, you will have to do this manually.
After following the steps below, You can enter the PIP commands in the symbol of the systemThis is a quick guide on how to add a PiP installation to the PATH environment variable using the Windows GUI:
- Press Windows key + R to open the Run dialog box. Then, type «sysdm.cpl» and press Enter to open the system properties screen.
- On the System Properties screen, access the Advanced tab and then click Environment Variables.
- On the Environment Variables screen, go to System Variables and Click Path to select it. Then, with the route selected, click Edit.
- In the Edit Environment Variable screen, Click New and add the path where the PiP installation is located. For Python 3.4, the default path is C:\Python34Scripts.
- After adding the route, open a new CMD window and try installing the Python package that comes with PiP. The error message “pip is not recognized as an internal or external command” should no longer appear.
If you want a quicker way to add the PiP location to an environment variable, use method 3.
Method 3: Add PIP to the PATH environment variable using CMD
A quicker way to set the PATH environment variable in PIP is to do it directly from the CMD window. This saves time, but can be a little intimidating if you're not used to using a terminal.
Here is a quick guide on How to set the PIP environment path directly from the command window:
- Press Windows key + R to open the Run dialog box. Then type “cmd” and press Enter to open the command window.
- In the command window, run the following command to set the PIP installation in the environment variable: setx PATH «%PATH%;C:Python37Scripts».
Note: Please note that this command uses the default location for Python 3.7. If you are using a different version of Python or have it installed in a non-standard location, change the path to $0027; $0027 accordingly.
- Check that this method is successful by running the Python installation package (which uses PIP) in the same CMD window. If the error message still appears, move on to the next method.
Method 4: Open the Python package without adding the PiP variable
If you are looking for a way to install the Python package from CMD without adding PiP to the PATH environment variable, you can use several commands to install it. This works even if you have used the above methods to install the PATH environment variable, but you are still getting an error message.
Here are some ways to open Python installation packages in CMD without adding the PATH variable:
Short method:
- Press Windows + R to open the Run dialog box. Then, write "cmd" and press Enter to open the command window.
- Enter the following commands, making sure to replace the wildcard with the package name: python -m pip install [package name].
Nota: Replace [package name] with the name of the package you want to install.
Long method:
- Open the dialog Run by pressing Windows + R keys. Then type “cmd” and press Enter to open the command window.
- In the CMD window, use the following command to navigate to the directory where the Python .whl file is located: cd C:\python\installed
Nota: In our example, the Python installation package was located in the directory named python installs. Change this command to go to the directory where the wheel is located.
- Then run the following command To install the PiP Python package:
c:python37scriptspip.exe install [package].whl
Nota: Remember to change the Python installation location if you have an older version or if you installed it in a non-standard location. Also remember to replace the [package] wildcard with the name of your package.
If you are unable to install the Python package via CMD window using the last two methods, use the last method below, in which we make sure that PiP is installed.
Method 5: Make sure PiP is included in your Python installation.
Before you reinstall the entire Python environment, check that you haven't forgotten PiP in your Python installation. Some Python installers exclude PiP from the installation by default. Fortunately, You can solve this problem by modifying your installation from Python to install PiP. Here are some brief instructions on how to do it:
- Press the Windows + R keys to open the “Run” dialog box. Then, type «appwiz.cpl» and press Enter to open Programs and Features.
- In Programs and Features, right-click your Python installation and Select Edit.
- On the Edit Settings screen, click edit.
- On the Advanced Features screen, check the pip box and click Next.
- Click on Install to make changes to your Python installation.
- After modifying the Python installation, Open CMD window and verify that you can install the Python package using pip without getting the error message “pip is not recognized as an internal or external command”.
Method 6: Install Python using an executable installer
If you get this far and fail, reinstalling Python and its components will probably get rid of the “pip is not recognized as an internal or external command” error.
The easiest way is Using a Python executable installerIf you set it up correctly, PiP will be installed automatically. Here's a quick guide on how to do it:
- Press the Windows + R keys to open the Run dialog box. Then, type «appwiz.cpl» and press Enter to open Programs and Features.
- In Programs and Features, Scroll through the list of programs to find the Python installation. When you find the program, right-click it and select Uninstall. Then follow the on-screen instructions to uninstall it from your system. After removing the Python distribution from your computer, restart your computer.
- Open the installer executable and first make sure that the Add Python to PATH box is checked – this will ensure that you can run Python commands on the command line. Next, click Configure.
- In the Advanced Properties window, make sure the pip box is checked, and then click Next.
- Leave the default location and advanced options selected, and Click Install to start the installation.
- After the installation is complete, Manually restart your computer if you are not prompted to do so automatically.
- the next time Boot, Check that the problem has been resolved trying to install Python package from CMD window.
- If you keep seeing the error message “pip not recognized as internal or external command”, Enter the following command in the CMD window: python -m ensurepip –default-pip
Nota: Some Python distributions (especially 3.6) do not have PiP installed by default. One of the corrections in the official documentation is this command.
This is a common problem, and many users encounter it repeatedly. This is the only reason for this at the moment.
You can also read: 8 Programs Made In Python
My name is Javier Chirinos and I am passionate about technology. Ever since I can remember, I have been interested in computers and video games, and that passion has turned into a job.
I have been publishing about technology and gadgets on the Internet for over 15 years, especially in mundobytes.com
I am also an expert in online marketing and communication and have knowledge in WordPress development.