Weird errors when loading/running a Julia notebook in Jupyter

I have Jupyter lab running on my Linux machine, installed standalone with pip, all latest versions of everything, including a fresh system install of Julia which is working in the system console fine. I do not have Conda installed, I install all my data science apps by hand. My Jupyter runs flawlessly with Python, R, and whatever else I throw at it. I installed and compiled the IJulia kernel package, and when I open Jupyter Lab I can see the Julia icons, open a Julia console (which works), and create a new Julia notebook. But when a Julia notebook tries to run cells, it starts spitting out weird errors to the Jupyter console (I keep it running in a terminal in the background). Here’s the output:

[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package **Conda** does not have Downloads in its dependencies:
- If you have Conda checked out for development and have
  added Downloads as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Conda
 [1] require(::Module, ::Symbol) at ./loading.jl:906
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include(::Module, ::String) at ./Base.jl:368
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:331 [inlined]
 [6] eval(::Expr) at ./client.jl:467
 [7] top-level scope at ./none:3
in expression starting at /home/louis/.julia/packages/Conda/1403Y/src/Conda.jl:18
ERROR: LoadError: LoadError: Failed to precompile Conda [8f4d0f93-b110-5947-807f-2305c1781a2d] to /home/louis/.julia/compiled/v1.5/Conda/WZE3U_e29u5.ji.
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include at ./Base.jl:368 [inlined]
 [8] include(::String) at /home/louis/.julia/packages/IJulia/e8kqU/src/IJulia.jl:33
 [9] top-level scope at /home/louis/.julia/packages/IJulia/e8kqU/src/IJulia.jl:93
 [10] include(::Function, ::Module, ::String) at ./Base.jl:380
 [11] include(::Module, ::String) at ./Base.jl:368
 [12] top-level scope at none:2
 [13] eval at ./boot.jl:331 [inlined]
 [14] eval(::Expr) at ./client.jl:467
 [15] top-level scope at ./none:3
in expression starting at /home/louis/.julia/packages/IJulia/e8kqU/src/jupyter.jl:8
in expression starting at /home/louis/.julia/packages/IJulia/e8kqU/src/IJulia.jl:93

As I said, it’s weird because I DO NOT have Conda anywhere near 100 km of my system. Why is the error mentioning Conda? Why is it precompiling IJulia? (is that Julia’s JIT compiler in action?). IJulia was already loaded, added, and built. And the Julia kernel seems to be connecting to Jupyter ostensibly, but then it spits out these errors.

Any help appreciated.

IJulia has Conda.jl (the Julia package) as a dependency, and the error is reporting that another Julia module Downloads (from the Julia standard library) is imported in Conda, but it is missing from the list of dependencies for Conda. But I agree it is a weird message; I can’t reproduce it on Julia v1.7, but it looks like you’re using v1.5. I recommend upgrading to at least v1.6, but preferably v1.7 or higher.

This section in the documentation might help explain what’s happening?:

The first time you run notebook() , it will prompt you for whether it should install Jupyter. Hit enter to have it use the Conda.jl package to install a minimal Python+Jupyter distribution (via Miniconda) that is private to Julia (not in your PATH ). On Linux, it defaults to looking for jupyter in your PATH first, and only asks to installs the Conda Jupyter if that fails; you can force it to use Conda on Linux by setting ENV["JUPYTER"]="" during installation (see above). (In a Debian or Ubuntu GNU/Linux system, install the package jupyter-client to install the system jupyter .)

So I would suggest something like

  1. ] rm IJulia
  2. ENV["JUPYTER"] = /path/to/your/jupyter
  3. ] add IJulia
  4. ] build IJulia

Basically, yes, it’s running the Julia compiler over the package to help with JIT (for when you actually need to run).