Jojo Jojo - 1 year ago 81
Python Question

Trying to access Python through Windows Command Prompt without adding Environment Variable

I am trying to access Python through a Windows command prompt, but am at an office and cannot add an Environment Variable. So, I cant follow the advice provided here. Thus, I added a User Environment Variable through User Accounts and use Variable:python and Value: C:\Python33. When I do a Windows Run check on %python% I reach the required Python33 folder. However, when I type

python -Version
in the command prompt I get the error
'python' is not recognized as an internal or external command, operable program or batch file.
I am not sure how to proceed.

Ken Ken
Answer Source

Run Python from the command prompt and include the full path to python.exe. For example to get the version:

C:\Python33\python.exe --version

When you run a script you specify the path to the script if you're not in the directory where the script is located. For example, if your script is in C:\scripts and is called

C:\Python33\python.exe C:\scripts\