Environment Variables PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

AddPythontothePATHEnvironmentalVariable
(pythonisnotrecognizedasaninternalor
externalcommand)
ManydevelopersinstallPythonontheirWindowsmachine,andwhenthey
try to run the console command python.exe , they get the following error
message:

pythonisnotrecognizedasaninternalorexternalcommand

.
We'llshowyouhowtoinstallPython,andfixthiserror.ByaddingPython
tothePATHenvironmentalvariable.

Step1:DownloadPython
First visit the official Python download page and download the latest
release.Atthetimeofthiswritingthelatestversionsare2.7.3and3.3.0.

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

1/6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

Install it by double clicking the Python installer setup file and follow the
wizardalong.

Step2:AddPythontothePATHEnvironmentalVariable
Next, let's click on the Start Menu and right click My Computer. Click
onAdvancedSystemSettings.

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

2/6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

3/6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

ThenclickonEnvironmentVariables.ThisiswherewecanaddPythonto
thePATHenvironmentalvariable.

Findthe PATH variableandclickEdit.YouwanttoaddPythontothisPATH


variablebyaddingC:\Python27totheendofthatstring(orwhateverthe
pathtoyourPythoninstallationis).
Saveyourchanges!

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

4/6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

Sowhatexactlyishappeninghere?
Whenyoutypein python inacommandprompt,Windowswillusethe PATH
environmental variable to get a list of directories to go looking for the
python.exe file. Before you followed the steps here, it couldnt find the
python.exefile,hencetheerror.
Now that the PATH variable is set, when you execute python via the
Windowsconsole,you'llseeafamiliarprogrammingprompt.

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

5/6

06/06/2016

AddPythontothePATHEnvironmentalVariable(pythonisnotrecognizedasaninternalorexternalcommand)

PythonrunningonWindows!

http://pythoncentral.io/addpythontopathpythonisnotrecognizedasaninternalorexternalcommand/

6/6

You might also like