I am trying to run python from the powershell, I go to the python directory using
cd f:\python27
If i type python i get the following error (despite it being a exe file in the folder):
python : The term 'python' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ python
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command python was not found, but does exist in the
current location. Windows PowerShell does not load commands from the current
location by default. If you trust this command, instead type: ".\python". See "get-
help about_Command_Precedence" for more details.
If I type .\python it just does nothing and returns the prompt again. I created a simple file called helloworld.py in a text editor and saved it into the python27 directory, which contains one line:
print "Hello World!"
and I tried typing both
python helloworld.py
.\python helloworld.py
The first returns the original error and the second returns the prompt again without apparently doing anything, I cant get the python program to run. I am new to Powershell and Pyton and I am trying to work my way through learn python the hard way, can anyone help or point where I am going wrong and explain what it is I am doing wrong and what the solution is? thanks