Impossible to add functional packages in Julia v1.9: Plots, Interact, WebIO

Hello everybody,
I’m new on Julia Discourse, used Julia from version 0.6.4, 1.0 and after 1.6.x LTS
I tried to jump to one of the last stable versions, so I installed a portable version 1.9.
My goal was essentially to make functional use of the packages Interact inside a IJulia notebook or labserver.

Unfortunately, it was really impossible to install no one of the implied packages or their dependencies. More exactly, I may add them to Julia, but when I try to charge them by “using…”, I have a lot of precompilation errors, and specific other errors for each case.

BTW, I want to specify the fact that my context is a little bit particular: I’m using Windows 7 SP1, because of legacy constraints with respect to some essential software in my personal development. I have many hardware contexts already using Win 7 SP1 (on laptops or desktops) which work perfectly with Julia 1.6.7 for example.

On the other hand, exasperated because of impossibility for using Conda.jl, I installed Anaconda3 in my system, and also Python v3.7 (working with Win 7 SP1, versions highers than 3.8 have issues for working with, and needs at least Windows 10).

FIRST QUESTION, before detailing my error messages (if not, I will open a too much post there…): it is a ‘common knowledge’ in the Julia community that last versions of Julia are incompatible with the cited packages?
NB: In the past, I have seen already incompatibilities of CUDAnative and CuArrays, CUDAdrv etc with versions of Julia higher than 1.6.x, because of the new ‘unified’ replacement: CUDA.jl (their creator unified them inside this package).

SECOND QUESTION: Maybe I need to downgrade the versions of some packages, or dependencies? This was a solution for being able to make functional CUDA.jl and other packages in Julia v1.6.7 for example…

I will add the message errors for each package in the next post.
Thank you by advance.

There are the errors for each one of the cited packages. Excuse me if I packed all of them inside the same post (maybe it would have been better to create an individual ticket for each one, but unfortunately they are intimately related for doing the task of plotting dynamic plots in a Jupither notebook.

Julia inputs and outputs for Plots.jl

add Plots
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use status --outdated -m
Precompiling project…
✗ GR_jll
✗ Plots
✗ Plots → IJuliaExt
✗ Plots → UnitfulExt
8 dependencies successfully precompiled in 63 seconds. 289 already precompiled. 6 skipped during auto due to previous errors.
4 dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages

using Plots
using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: UndefVarError: GR_jll not defined
Stacktrace:
[1] init()
@ GR.GRPreferences C:\Users\User.julia\packages\GR\yBe3g\src\preferences.jl:64
[2] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1074
[3] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base .\loading.jl:1020
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base .\loading.jl:1471
[5] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1748
[6] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[7] macro expansion
@ .\loading.jl:1613 [inlined]
[8] macro expansion
@ .\lock.jl:267 [inlined]
[9] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576
[10] top-level scope
@ C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:402
[11] eval
@ .\boot.jl:370 [inlined]
[12] _initialize_backend(pkg::Plots.GRBackend)
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:401
[13] backend(pkg::Plots.GRBackend)
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:266
[14] backend(sym::Symbol)
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:276
[15] load_default_backend()
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:207
[16] backend()
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\backends.jl:254
[17] top-level scope
@ C:\Users\User.julia\packages\Plots\sxUvK\src\init.jl:83
[18] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[19] include(x::String)
@ Plots C:\Users\User.julia\packages\Plots\sxUvK\src\Plots.jl:1
[20] top-level scope
@ C:\Users\User.julia\packages\Plots\sxUvK\src\Plots.jl:176
[21] include
@ .\Base.jl:457 [inlined]
[22] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId
@ Base .\loading.jl:2010
[23] top-level scope
@ stdin:2
during initialization of module GRPreferences
in expression starting at C:\Users\User.julia\packages\Plots\sxUvK\src\init.jl:83
in expression starting at C:\Users\User.julia\packages\Plots\sxUvK\src\Plots.jl:1
in expression starting at stdin:2
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to “C:\Users\User\.julia\compiled\v1.9\Plots\jl_894D.tmp”.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2260
[3] compilecache
@ .\loading.jl:2127 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1770
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[6] macro expansion
@ .\loading.jl:1613 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576

Error messages for Interact.jl

add Interact
(no error messages)

julia> using Interact
[ Info: Precompiling Interact [c601a237-2ae4-5e1e-952c-7a85b0c7eef1]
ERROR: LoadError: UndefVarError: Sockets not defined
Stacktrace:
[1] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[2] include(x::String)
@ WebIO C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:1
[3] top-level scope
@ C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:44
[4] include
@ .\Base.jl:457 [inlined]
[5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_pat
@ Base .\loading.jl:2010
[6] top-level scope
@ stdin:2
in expression starting at C:\Users\User.julia\packages\WebIO\cOHMI\src\scope.jl:17
in expression starting at C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile WebIO [0f1e0344-ec1d-5b48-a673-e5cf874b6c29] to "C:\Users\User\.julia\compiled\v1.9\W
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2260
[3] compilecache
@ .\loading.jl:2127 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1770
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[6] macro expansion
@ .\loading.jl:1613 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576
[9] include
@ .\Base.jl:457 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_pa
@ Base .\loading.jl:2010
[11] top-level scope
@ stdin:2
in expression starting at C:\Users\User.julia\packages\InteractBase\LJXv3\src\InteractBase.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile InteractBase [d3863d7c-f0c8-5437-a7b4-3ae773c01009] to "C:\Users\User\.julia\compiled\
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2260
[3] compilecache
@ .\loading.jl:2127 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1770
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[6] macro expansion
@ .\loading.jl:1613 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576
[9] include
@ .\Base.jl:457 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_pa
@ Base .\loading.jl:2010
[11] top-level scope
@ stdin:2
in expression starting at C:\Users\User.julia\packages\Interact\PENUy\src\Interact.jl:1
in expression starting at stdin:2
ERROR: Failed to precompile Interact [c601a237-2ae4-5e1e-952c-7a85b0c7eef1] to "C:\Users\User\.julia\compiled\v1.9\Interact
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2260
[3] compilecache
@ .\loading.jl:2127 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1770
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[6] macro expansion
@ .\loading.jl:1613 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576

Message errors for loading WebIO:

(@v1.9) pkg> add WebIO
Resolving package versions…
Updating C:\Users\User\.julia\environments\v1.9\Project.toml
⌃ [0f1e0344] + WebIO v0.8.92
No Changes to C:\Users\User\.julia\environments\v1.9\Manifest.toml

julia> using WebIO
[ Info: Precompiling WebIO [0f1e0344-ec1d-5b48-a673-e5cf874b6c29]
ERROR: LoadError: UndefVarError: Sockets not defined
Stacktrace:
[1] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[2] include(x::String)
@ WebIO C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:1
[3] top-level scope
@ C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:44
[4] include
@ .\Base.jl:457 [inlined]
[5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_pat
h::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2010
[6] top-level scope
@ stdin:2
in expression starting at C:\Users\User.julia\packages\WebIO\cOHMI\src\scope.jl:17
in expression starting at C:\Users\User.julia\packages\WebIO\cOHMI\src\WebIO.jl:1
in expression starting at stdin:2
ERROR: Failed to precompile WebIO [0f1e0344-ec1d-5b48-a673-e5cf874b6c29] to “C:\Users\User\.julia\compiled\v1.9\WebIO\jl_6E
BE.tmp”.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:2260
[3] compilecache
@ .\loading.jl:2127 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1770
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1625
[6] macro expansion
@ .\loading.jl:1613 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1576

The standard info about WebIO is very heterogenous with respect with its use: some specifies that it is automatically called as dependency, some says that WebIO must be charged at the same time when using Interact, some others specifies the need to install first different dependencies, which will add a lot of mixing conflicts inside higher versions of Julia (which are less compatible with the dependencies of too old packages)

See here:

Basically, I got it working by removing the packages from all my projects. Then doing this:

But it appears using a temp directory was insufficient to isolate the problem. What I did is remove all those packages from my project then run ]gc --all. I saw this did delete them in ~/.julia/packages.

Then reinstalled the packages one by one. The order maybe matters but if you see an error then remove the last one, do the garbage collection, then try with another.

I think in the end just installing one by one after making sure the packages were actually deleted worked (by the package manager, doing it manually sounded like a bad idea).

Edit:
People who know better than I thought it was an issue with how the package manager deals with the new extension packages introduced in version 1.9. So I assume this issue is being worked on, but for now that worked for me…

Not too good since no longer supported by Microsoft, nor by Julia. I think it will though still work. What was the last Julia version made for Windows 7? Julia 1.6 LTS maybe or some older unsupported Julia?

Python 3.7 is no longer supported. You should be using Python 3.8 since it’s supported (but only with security updates up to October 2024). Then:

Note that Python 3.9.16 cannot be used on Windows 7 or earlier.

I believe Python prevents installing on those unsupported versions for some reason, i.e. they know they could either end up not working.

I don’t know that Julia has ever done similar, and hypothetically that could be the reason something is failing for you. Though I doubt it, and think your problem is elsewhere. Would you try all your steps on a Windows 10+ computer first?

This is the common error message across multiple packages. The standard library package, Sockets, is failing to load.

I would focus on that first. Can you load Sockets?

using Pkg
Pkg.add("Sockets")
using Sockets
Sockets

Try that and report any errors.

An error here is very surprising and suggests a problem with the system image. You might want to try a clean installation. Also consider moving the .julia folder to .julia_bak.