Levente Varga Levente Varga - 26 days ago 11
Python Question

"python" and "pip" command not found in Command Line

I recently installed Python 3.6 for my Windows 10 (64bit) and I want to use pip, but before to install that, I need to execute the following command using the downloaded get-pip.py program:

python get-pip.py

Somehow this doesn't work and I get the following message from Command Line:

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

(I get the same message when I want to execute some pip commands)

I tried a lot of "solutions" for installing pip, like downloading files from https://bitbucket.org/pygame/pygame/downloads/ but nothing happened, I got the messages...

Could you explain to me why the Command Line doesn't know these commands and how can I install them?

Answer Source

No need for admin access:

The reason the error is arising is because python is not in your PATH (meaning it can be called from any directory in the prompt). You can check that its not in the PATH by typing the following:

echo %path%

which will return lost of different directory paths, but not the one to where you have python installed.

To add python to this (and get rid of your error), follow these steps:

  1. Open up control panel.

  2. Go to System. (skip to this step with: Win+Break )

  3. Go to the Advanced tab at the top.

  4. Click on Environment Variables at the bottom.

  5. In the section User variables for ___, add a new one with New.

  6. In this pop-up add the name : path and value : C:\Python34 (or wherever it is installed).

Hope this helps as this is what I did to get python to work from any directory in the command prompt!