将 Python3 指定为 Windows 10 上的 Atom
Specify Python3 to Atom on Windows 10
提前道歉,如果这个问题应该在 SuperUser 或其他网站上提出
python3 shebang 似乎不适用于 win10。 (我现在无法检查,但我相信昨晚在 MacOS 上类似的方法对我有用)。考虑以下
#!/usr/bin/env python3
print("hello world")
导致错误 'python' is not recognized as an internal or external command,
operable program or batch file
。这是有道理的,因为我的机器上只有一个 python3 发行版(只能像 python3
这样调用)。然而,Atom 似乎完全忽略了 shebang。仅供参考,我是 运行 带有流行 "script" 原子包的脚本。
我已经尝试了排列,#!/usr/bin python3
,但这也不起作用。
我试过排列组合
我仍然对 shebang 如何在 Atom 环境中工作感兴趣,但就 python3 和 运行 而言,您不需要 shebang。您可以简单地从 Atom 中更改配置文件 (python.coffee),然后重新启动。在这里查看 Daniel Chamorro 的出色回答:
提前道歉,如果这个问题应该在 SuperUser 或其他网站上提出
python3 shebang 似乎不适用于 win10。 (我现在无法检查,但我相信昨晚在 MacOS 上类似的方法对我有用)。考虑以下
#!/usr/bin/env python3
print("hello world")
导致错误 'python' is not recognized as an internal or external command,
operable program or batch file
。这是有道理的,因为我的机器上只有一个 python3 发行版(只能像 python3
这样调用)。然而,Atom 似乎完全忽略了 shebang。仅供参考,我是 运行 带有流行 "script" 原子包的脚本。
我已经尝试了排列,#!/usr/bin python3
,但这也不起作用。
我试过排列组合
我仍然对 shebang 如何在 Atom 环境中工作感兴趣,但就 python3 和 运行 而言,您不需要 shebang。您可以简单地从 Atom 中更改配置文件 (python.coffee),然后重新启动。在这里查看 Daniel Chamorro 的出色回答: