本文介绍了如何配置 Atom 以运行 Python3 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
In my terminal, I type $ which python3
, outputting
/opt/local/bin/python3
I would like to configure Atom to run Python3 scripts. In my Atom Config, I have
runner:
python: "/opt/local/bin/python3"
However, if I run the following script in some script named filename.py
,
import sys
print(sys.version)
I get the following output:
2.7.11 (default, Feb 18 2016, 22:00:44)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
How exactly does one set up the PATH for Python3.x scripts to run correctly? Is there a different package I could use?
解决方案
Go to the Atom's menu bar -> Packages -> Script -> Configure Script (Or, you can use the shortcut Shift+Ctrl+Alt+O)
Then type python3
to the Command space.
Hopefully, it will work.
这篇关于如何配置 Atom 以运行 Python3 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!