How to configure Atom to run Python3 scripts?

EB2127 picture EB2127 · Feb 22, 2016 · Viewed 77.6k times · Source

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?

Answer

Terry picture Terry · Apr 19, 2016

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.