Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
491 views
in Technique[技术] by (71.8m points)

sublimetext3 - How to run a python code on sublime text 3?

i tried to run my code on windows 8 using ctrl+B but it gave the following error.

'python' is not recognized as an internal or external command,
operable program or batch file.
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u "C:Usersvishal_pcDocumentspython_codeshelloworld.py"]
[dir: C:Usersvishal_pcDocumentspython_codes]
[path: c:Program Files (x86)AMD APPinx86_64;c:Program Files (x86)AMD APPinx86;c:Program Files (x86)InteliCLS Client;c:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;c:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)Windows LiveShared;C:Program Files (x86)QuickTimeQTSystem;C:Program FilesIntelWiFiin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program FilesMicrosoftWeb Platform Installer]

some body please help! thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looks like your PATH isn't setup correctly. Sometimes this happens when you install Python in a specific folder instead of the default C:Python folder (e.g. C:Python27)

To setup your PATH, right click on 'My Computer' and click 'Properties', then in the 'System Properties' click on the 'Advanced' tab. In the 'System variables' section, you'll see a variable called 'Path'. Now add where you installed Python to that list (additional items are appended with a semicolon).

For example, if you installed on C:Program FilesPython27 then you would add ";C:Program FilesPython27" to your PATH variable.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...