Reputation: 1407
I'm on Windows 7 and if I type "python" in the command prompt as my regular user, I get the old, "'python' is not recognized as an internal or external command, operable program or batch file." but if I open the prompt as the administrator, python initiates like it should.
The very first thing I did was edit the PATH variables through Control Panel, which seemed to add the environment variable, but there's a disconnect between doing this and cmd recognizing that I've done it.
I have changed the permissions on the Python27 folder to allow full access to all users, I've tried adding a pythonexe variable and add that to the PATH, as another StackOverflow question suggested.
When I type PATH = C:\Python27 into cmd as a regular user, that also wont work.
and if I type in set PATH, "C:\Python27;" is in the returned line.
I'm fairly certain it's a permission problem, which is the only reason I've re-posted my own version of this age old question. How do I run Python, given this error and these circumstances?
Upvotes: 1
Views: 4087
Reputation: 898
I've experienced a similar issue in the past and found that also checking the order of the values in the environmental/system variables matters as well.
Upvotes: 0
Reputation: 11
So, one of the things I noticed when I had that problem is that the USERNAME environment variable was only set to system which is the administrator environment variable. I simply looked up the username in the regular command prompt, using echo %USERNAME% and appended a semicolon and the username to the %USERNAME& environment variable. That fixed the issue. Everything you can do in the administrator is now able to be done in the regular user command line as well.
Upvotes: 1
Reputation: 6246
To append your path with python directory: path=%PATH$;c:\Python27
Run as normal user.
You should also double check that c:\python27\python.exe
actually exists.
Upvotes: 2