Jupyter, IJulia and "No Active Project"

I am following the directions for setting up IJulia

However, when I add IJulia I get the message

pkg> add IJulia

ERROR: no active project

I tried “activate .” which then allows me to add IJulia

However, when I run a Julia expression in Juptyer I get the repeating error

[I 11:03:51.223 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports

ERROR: LoadError: ArgumentError: Package IJulia not found in current path:

- Run `import Pkg; Pkg.add("IJulia")` to install the IJulia package.

What is the correct way to set up Jupyter for Julia?

Thanks
P

Additional info:

On the assumption that Jupyter runs JuIia in the default project, I also tried

activate /Users/peter.wolf/.julia/environments/v1.0
add IJulia

But got the same problem

[I 16:44:03.141 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
kernel f6bd133a-b37c-4c9a-b033-84d8ef40b00b restarted
ERROR: LoadError: ArgumentError: Package IJulia not found in current path:
- Run `import Pkg; Pkg.add("IJulia")` to install the IJulia package.
Stacktrace:
  [1] require(::Module, ::Symbol) at ./loading.jl:823
  [2] include at ./boot.jl:317 [inlined]
  [3] include_relative(::Module, ::String) at ./loading.jl:1044
  [4] include(::Module, ::String) at ./sysimg.jl:29
  [5] exec_options(::Base.JLOptions) at ./client.jl:231
  [6] _start() at ./client.jl:425

Got it!

I had added JULIA_LOAD_PATH to my .bash_profile. It was messing up the active project on startup. Removing it, fixed the issue

export JULIA_LOAD_PATH="/Users/peter.wolf/xxx..."
1 Like