繁体   English   中英

如何在sublime文本3上运行python代码?

[英]How to run a python code on sublime text 3?

我试图使用ctrl + B在Windows 8上运行我的代码,但它给出了以下错误。

'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:\Users\vishal_pc\Documents\python_codes\helloworld.py"]
[dir: C:\Users\vishal_pc\Documents\python_codes]
[path: c:\Program Files (x86)\AMD APP\bin\x86_64;c:\Program Files (x86)\AMD APP\bin\x86;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft\Web Platform Installer\]

有些身体请帮忙! 谢谢。

看起来您的PATH设置不正确。 有时,当您在特定文件夹而不是默认的C:\\ Python文件夹(例如C:\\ Python27)中安装Python时会发生这种情况

要设置PATH,请右键单击“我的电脑”并单击“属性”,然后在“系统属性”中单击“高级”选项卡。 在“系统变量”部分中,您将看到一个名为“路径”的变量。 现在将Python的安装位置添加到该列表中(其他项目附加分号)。

例如,如果您安装在C:\\ Program Files \\ Python27上,那么您应该将“; C:\\ Program Files \\ Python27”添加到PATH变量中。

轻松修复的步骤[对于Pyhton 3.X] 1.卸载当前版本1.重新安装注意:确保您允许复选框如图所示[基于3.7]

... 在此输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM