‘pip’ is not recognized as an internal or external command, operable program or batch file

Total
0
Shares

Python throws the error, ‘pip’ is not recognized as an internal or external command, operable program or batch file, when either the pip is not installed or its path is not set in environment variable.

To install pip

By default pip is packaged with Python, but if somehow it is not there, you can either run the Python installer again and check pip box –

python installer select pip

Or download it from pypa and install. According to pip documentation

First download get-pip.py from this link – https://bootstrap.pypa.io/get-pip.py

then run this below command –

py get-pip.py

To add path in environment variable

First of all, check where your python is installed. Some common locations are –

C:\Program Files\Python36\

C:\Python27\

Now add the path using this command –

setx PATH "%PATH%;C:\Program Files\Python36\Scripts"

Note: After running this command, you need to close the command prompt and open again.

To install a package

py -m pip install [packagename]

These steps will resolve the issue of pip not recognized as internal or external command.

    Tweet this to help others

Sign Up for Our Newsletters

Get only the best articles delivered to your mail

You May Also Like