problem with Run python3 code in Atom on ubuntu

Aditya singh

script i am using this package on atom.

getting this error

[Command: python3 -u '/home/aditya/Documents/python/py4e book solved problems/not done py4e 5.10ex q1 loop.py']

after making change to. [/home/aditya/.atom/packages/script/lib/grammars] i had changed python to python3

exports.Python =
  'Selection Based':
    command: 'python3'
    args: (context) -> ['-u', '-c', context.getCode()]

  'File Based':
    command: 'python3'
    args: ({filepath}) -> ['-u', filepath]
abhivemp

EDIT: if you just want to run python3 through atom: Open the atom-python-run package settings (atom Settings >> packages >> find atom-python-run >> settings)

In F5 command section, change the default to python3 {file}. It should look something like this.

EDIT: Make sure that F5 doesn't interfere with another command from another package. Or else you can use F6 as well. enter image description here

Restart, atom. You should be good to go!

If you aren't able to run python scripts through atom. Then here's the package you can install.

atom-python-run

In short:

  1. You need python installed on your computer and you need to add it to your PATH

  2. Restart atom

  3. To run your (.py) file, hit F5 or F6

Hope this helps!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related