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.
4 Answers
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 my_script.py
:
C:\Python33\python.exe C:\scripts\my_script.py

- 226
- 1
- 6
Instead of setting environment variables, you can use the whole path, like Neo wrote e.g.: C:\Python33\python.exe yourPythonScript.py
Remove any environment variables you have added.

- 161
- 1
- 2
- 10
I once Had a similar problem, but i couldnt find any solution, not even adding the path to the python folder was working. Then I opened Python and clicked in File, then browser path, and I found that I had another folder that contained the real Python folder, not the default one. Maybe it could work for you too.

- 99
- 1
- 16