【问题标题】:How to run a python code on sublime text 3?如何在 sublime text 3 上运行 python 代码?
【发布时间】:2014-03-01 22:29:28
【问题描述】:

我尝试使用 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\]

请一些人帮忙! 谢谢。

【问题讨论】:

  • 你安装了 Python 吗?
  • 是的,我已经在我的系统中安装了 python3.3。
  • 它可能已安装,但它的安装目录(python.exe 所在的位置)似乎不在 PATH 中。
  • 那么如何更正路径呢?
  • @user3275​​284:也许是谷歌? stackoverflow.com/questions/6318156/…

标签: python sublimetext3


【解决方案1】:

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

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

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

【讨论】:

    【解决方案2】:

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

    ...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-08-05
      • 2012-01-23
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      相关资源
      最近更新 更多