'How do I run a python file in Atom? Conda env?

I don't quite know what to do. I use VSCode and Jupyter Notebook and conda env. I just downloaded Atom and it keeps saying no kernal for grammar python. I have a similar problem if I try using the conda command in Terminal where it doesn't recognize the conda command until I:

export PATH=/Users/edgar/anaconda3/bin:$PATH

How do I make my atom run my python code? Thank you very much.



Solution 1:[1]

to set up atom to become a python ide you need packages like:

Community Packages (14) /home/simone/.atom/packages
??? [email protected]
??? [email protected]
??? [email protected]
??? [email protected]
??? [email protected]
??? [email protected]
??? [email protected] (disabled)
??? [email protected]
??? [email protected]
??? [email protected]

and to run atom on a conda / pyenv environment you just need to:

$ cd [path to project]
$ conda activate [env]
$ atom .

so that atom will use that python env to run the scripts.

Solution 2:[2]

The easiest way is to install the package script. Then open the python script you want to run and go to the packages menu in the menu bar. Under this menu, you should see an option - Script. Select "script" and one option is to run the python script. Select this option and your python file should run. You can also tap the F5 key. That will also run your file.

This assumes you have the package "language-python" installed in Atom. If you dont you can get it from here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 simone viozzi
Solution 2