简体   繁体   English

python3和Atom的难点

[英]Difficulties with python3 and Atom

When I use the Script package for Atom to run code in python3, or any package to run code for that matter, I get an error message that says: 当我使用Atom的Script程序包在python3中运行代码或使用任何程序包来运行此代码时,我收到一条错误消息,内容为:

'python3' is not recognized as an internal or external command, operable program or batch file. 无法将“ python3”识别为内部或外部命令,可操作程序或批处理文件。

I've changed the python.coffee file from python to python3 and neither have worked. 我已经将python.coffee文件从python更改为python3,但都没有起作用。

To enable Atom to run python 3, using the script plugin, make the first line of your script be the path to your python3 interpreter. 要使Atom使用脚本插件运行python 3,请将脚本的第一行作为python3解释器的路径。 I can use script to run either python 2.7.13 or python 3.6 by changing first line of my script #!path-to-python2 to #!path-to-python3. 通过将脚本#!path-to-python2的第一行更改为#!path-to-python3,我可以使用脚本来运行python 2.7.13或python 3.6。 I just checked this and it worked as described. 我只是检查了一下,它按说明工作了。

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

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