I can't use pip (Windows)

Viewed 92054

I'm wanting to learn machine learning, but it requires that I use 'pip.' I'm still very new to a lot of this stuff. I've installed Python 3.4 64-bit and get-py.py.

When I run pip install sklearn I get 'pip' is not recognized as an internal or external command, operable program or batch file.

Here's a screenshot of my environmental variable PATH

https://gyazo.com/c7ec926401878845d5c4f9a556cf00ee

Any help would be greatly appreciated. I have checked out other posts where people had similar issues, but I tried various things and nothing worked.

9 Answers

For anyone that might have installed Python using the MSI installer, and ticked the box to include pip, but still gets the error 'pip' is not recognized as an internal or external command, operable program or batch file:

It looks like that the pip executable is installed in the \Scripts subdirectory of the Python installation, but that directory does not get automatically added to PATH.

For me, since I had installed Python 2.7, the directory was C:\Python27\Scripts. After adding this path to the PATH environment variable, and open a new CMD window, pip was available as a command.

I've made a workaround that will help you, copy the batch script below and modify it as specified:

@"PATH to python.exe" "PATH to pip.exe" %*

For example like this:

@"C:\programming\bin\python374\python.exe" "C:\programming\bin\python374\Scripts\pip.exe" %*

Save this file as pip.bat on Desktop and then move it to C:\Windows\system32.

enter image description here

I'm late now, but just add python to your environment variables.

It´s explained in this short video, how to set up python to your environment variables: https://www.youtube.com/watch?v=Y2q_b4ugPWk

after that pip should work on your cmd prompt, without cd to "C:\Users\Admin\AppData\Local\Programs\Python\Python36\Scripts"

For Python 3.7 or higher at least (as today is October 4th 2019) in the installation window you need to check the box "add to PATH" when you first install Python.

This is late but in case anyone runs across this issue, pip installed for me as "pip3". Once I used pip3 as my command and not pip, it worked fine. Threw me for quite a loop since I've been using Python for years.

PIP Install and Upgrade

Ensure you are accessing the right location while accessing pip as shown in my link above. Starting Python 3.4, it is included by default with the Python binary installers.

Environment Variable It is also a good idea to update the environment variable if the path is not accessible by default, once the installation is complete.

Related