Why the Project Activated in Jupyter Notebook Does Not Change?

To my understanding, the original environment from which you start notebook() doesn’t matter, and isn’t used by Jupyter. Jupyter starts its own Julia process, based on the Julia kernel you select.

You can explicitly do

import Pkg
Pkg.activate("~/FreyaLab")

in a cell at the beginning of the notebook to get the notebook to activate that environment.

You can also create a different Jupyter kernel specifically for this project, if this is something you do all the time, but it’s probably overkill if you only need it for this one notebook.

3 Likes