Saturday, July 28, 2018

'pip' is not recognized as an internal or external command, operable program or batch file.

Windows fails to find pip after installing python

After installing python and adding the python path to your path environment variable, you open a cmd window and type the pip command to install a library:

c:\Users\myusername> pip install matplotlib

and you get back this error:

'pip' is not recognized as an internal or external command, operable program or batch file. 

Assuming that you have added the python directory to your path environment variable, you can execute pip this way:

c:\Users\myusername> python -m pip install matplotlib

This is because pip is usually located in the "Scripts" folder directly under the folder where python is installed.

Alternatively you can add the Scripts directory to your path environment variable.



No comments:

Post a Comment