Skip to content

Loading main package from higher-level env fails with extension of package in current env #49886

Closed
@oschulz

Description

@oschulz

We currently run into this problem with Plots plus IJulia frequently (on Julia v1.9.0):

using Plots

[ Info: Precompiling IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a]
ERROR: LoadError: ArgumentError: Package IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

IJulia is a bit peculiar in that you can really only have one version of it at the same time, otherwise these "IJulia version doesn't match ..." warnings appear. This is because the (default) Jupyter kernelspec is bound to a specific IJulia version (since "kernel.json" points to ".julia/packages/IJulia/SOME_VERSION/src/kernel.jl"). So one often keeps IJulia in the default (e.g. "v1.9") environment and out of specific project environment like the the "Project/Manifest.toml" kept next to a notebook. Plots, on the other hand, will typically be part of the "local" environment, of course.

For details, see JuliaPlots/Plots.jl#4719.

We initially thought this would be fixed by #48352, but the issue seems to persists in Julia v1.9.0 (we'll use a workaround based on Base.require, provided by @KristofferC (thanks!), in Plots.jl for now).

CC @t-bltg

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions