Pip Not Recognized as Internal or External Command
Encountering the "pip is not recognized as an internal or external command" error can be frustrating. Let's delve into the possible cause and provide a solution.
Cause:
When trying to use pip to install Django, it was discovered that the pip executable could not be located by the system. This is typically because the path to pip is not included in the PATH environment variable.
Solution:
To resolve this issue, we need to add the path of the pip installation to the PATH variable. By default, pip is installed under C:Python34Scripts on Windows systems. To update the PATH variable:
Check the Current Path:
Open a command prompt and type the following:
echo %PATH%
This will display the current PATH variable.
Add Pip Path to the PATH Variable:
If the pip installation path is not included in the PATH variable, add it using the following command:
setx PATH "%PATH%;C:\Python34\Scripts"
This will add C:Python34Scripts to the PATH variable.
Start a New Command Window:
Restart the command prompt window to activate the updated PATH variable.
Now, you should be able to use pip to install Django without encountering the error. Remember, you may need to update the provided path if your pip installation is located elsewhere.
The above is the detailed content of Why Isn't Pip Recognized as a Command, and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!