【发布时间】:2025-12-20 08:40:11
【问题描述】:
我安装了 sublime text3 并尝试在其中运行 python 代码。
当我从Build system 中选择python 并尝试运行代码时出现此错误:
'python' 未被识别为内部或外部命令, 可运行的程序或批处理文件。 [在 0.1 秒内完成,退出代码为 1] [shell_cmd: python -u "C:\Python26\Lib\py\try66.py"] [目录: C:\Python26\Lib\py] [路径:C:\Program Files (x86)\Common 文件\英特尔\共享 文件\cpp\bin\Intel64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 文件 (x86)\Skype\Phone\;C:\Program 文件 (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft SQL 服务器\100\Tools\Binn\;C:\Program Files\Microsoft SQL 服务器\100\Tools\Binn\;C:\Program Files\Microsoft SQL 服务器\100\DTS\Binn]
所以我安装了sublimeREPL 文件并在文件中设置了路径。
我创建了一个名为python26repl.sublime-build 的新构建系统,具有以下上下文:
> { "target": "run_existing_window_command", "id": "repl_python_run",
> "file": "config/Python/Main.sublime-menu" }
我将Build system 设置为python26repl.sublime-build。现在Build (CTRL+B) 不起作用。我的意思是他们除了保存代码什么都不做。
请帮忙,有什么问题?如何解决?
【问题讨论】:
-
您是否已将 Python 添加到 PATH 环境变量中?
标签: python sublimetext3