Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Julia Environment for IJulia Jupyter notebook?

I am encountering package compatibility issues within my global Julia environment for specific packages I want to use in a Jupyter notebook. Is there a way to tell IJulia to use a different environment instead of my global one?

like image 895
Alec Avatar asked Feb 26 '20 02:02

Alec


People also ask

Can you run Julia on Jupyter notebook?

After installing the necessary packages for your purposes, you can experience the high-performance Julia language in Jupyter notebook.

What environment does Jupyter use?

Once jupyter is installed, you can run jupyter notebook and a jupyter notebook should open up on your default browser. If not, you can go back to your terminal and copy the url. Note: The default python environment/kernel for the jupyter notebook is the conda environment where you ran the jupyter notebook command.


2 Answers

The default IJulia kernel sets --project=@. so the most convenient way (IMO) is to just keep your project in the same folder as the notebook. The result is that the correct project is used from the start and you don't have to worry about activating it while in the notebook.

like image 89
fredrikekre Avatar answered Sep 21 '22 20:09

fredrikekre


You can always start up a notebook, and within a cell run

using Pkg
Pkg.activate("./path/to/folder")
like image 43
kdheepak Avatar answered Sep 22 '22 20:09

kdheepak