Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding New Conda Env to Hydrogen for Atom

I work with many conda environments in my workflow and like to use the hydrogen package for the Atom Editor when I am exploring objects. However I always forget how to add a new jupyter kernel to the new environments even though it is only two lines of code.

What are those lines of code?

like image 882
rgalbo Avatar asked Sep 25 '17 22:09

rgalbo


People also ask

How do you specify a new environment location for Conda?

Create a new conda environment from a list of specified packages. To use the newly-created environment, use 'conda activate envname'. This command requires either the -n NAME or -p PREFIXoption.

How do you use Conda in Atom terminal?

Setting anacondaEnter in Atom configuration panel by pressing “CTRL” + “,” once you have it go to “Packages” and write “terminus” in the search bar, then press “Settings” and go to Core>Shell Override. if you see the precious (base) before your path then you made it !

How do I create a custom Conda environment?

You can create a custom conda environment from a conda compatible environment file ( environment. yaml ) using the odsc conda create command. By default, the create option also installs additional libraries to ensure that the conda environment is compatible with JupyterLab and the OCI services.


1 Answers

Here is the link to the github issue where the comment is answered.

The two lines of code to be run in your terminal are these:

source activate YourEnvNameHeRE
python -m ipykernel install --user --name YourEnvNameHeRE

After you run these two lines and restart Atom, you will now be prompted to choose which environment you use when evaluating code using Hydrogen.

like image 78
rgalbo Avatar answered Sep 21 '22 00:09

rgalbo