Chin
Chin

Reputation: 20675

Why is python only available with cmd in administrator mode?

I just installed Python 3.3 and tried to run it through the command prompt:

C:\Users\Foo>python

but I got this:

'python' is not recognized as an internal or external command, operable program or batch file.

which is weird, because I added it to PATH (C:\Python33\)

However, if I use an elevated command prompt then it runs fine:

C:\Windows\system32>python

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

What is going on here? How can I run python in a normal, non-elevated command prompt?

EDIT: It seems there are two PATH in my system. The one in System Properties\Environment variables is this:

C:\Python33\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\

and if I type path in a normal cmd I get this:

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\ Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Heroku\b in;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Windows Kits\8.0\Window s Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\

Why are there 2 path in my system, and why are they different? (one with python at the beginning, and one without)

Upvotes: 1

Views: 3841

Answers (4)

HelloThere
HelloThere

Reputation: 1

It's the trailing slash in the first entry! Change C:\Python33\ to C:\Python33 and it should work. Had the same problem just now and found this post via google.

Upvotes: -1

DragonVet
DragonVet

Reputation: 409

Otherwise you can access it by the command "py"

Upvotes: 3

bcollins
bcollins

Reputation: 3459

Probably because the Path environment variable was only added for the administrator account.

try:

cmd >>> set path=C:\Python33;%path%

you can also check though typing in "environment variables" into the text search and check if the installation folder is present.

Upvotes: 0

StvnW
StvnW

Reputation: 1834

Try running C:\Python33\python.exe from your non-admin command prompt. This will rule out any permissions issues.

Don't forget to re-start the cmd shell after setting Environment Variables.

Upvotes: 2

Related Questions