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?
No need for
admin
access:The reason the error is arising is because
python
is not in yourPATH
(meaning it can be called from any directory in theprompt
). You can check that its not in thePATH
by typing the following:which will return lost of different directory
paths
, but not the one to where you havepython
installed.To add
python
to this (and get rid of yourerror
), follow these steps:Open up
control panel
.Go to
System
. (skip to this step with: Win+Break )Go to the
Advanced
tab at the top.Click on
Environment Variables
at the bottom.In the section
User variables for ___
, add a new one withNew
.In this
pop-up
add thename
:path
andvalue
: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 thecommand prompt
!Open your CMD as administrator and type PATH (prints the output of your system PATH Variable). There have to be a PATH directing to your Python Installation directory. Only with that system Path your cmd knows where python.exe is and search there for python. Normally the Python Installation Setup asks if you want to set a Python Environment PATH Variable. Maybe run the setup again and watch out for that option. And I think there was a checkbox to automatic install pip for python.
If you want to set the Path Environment Variable use this:
https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10
If you want to manually install pip with GET-PIP you have to download get-pip.py first and then run it with python. Download get-pip from here.
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
This happens when Python executables are not added to PATH. @xyres provided a nice link on how to do this.
pip should be bundled with the official Python installer, so there should be no need to get it from other sources