Precompiling error with DifferentialEquations

Hello,

I am very new to Julia and I’ve been struggling with a problem since DifferentialEquations got updated. My code was working but now several dependencies that I need will not precompile, and my code won’t execute because it does not recognize Tsit5 and other crucial functions. When I try to run the “using” line, I get the following message:

Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] (cache misses: wrong dep version loaded (2), incompatible header (2), dep missing source (2)).

I tried running an older version of the package, then I tried removing and re-downloading the package, and then I tried deleting and re-downloading an updated version of Julia and running the newer version with the most up-to-date package and nothing works. I am launching Julia into Jupyter notebooks with Anaconda Navigator, and running a Julia 1.11.4 kernel, as well as using v7.16.1 of DifferentialEquations.

Any advice would be greatly appreciated!

Thanks!

How did you install Julia?

I used the download link here: Download Julia

Interesting. It seems like you’re having download issues? Do you have full permissions on this computer?

Hi,

That shouldn’t be a problem, the computer is my personal laptop.

I tried installing everything fresh on my PC (to use a different OS), and I am still having problems with the same 15 dependencies. I downloaded julia from the command line in the website I mentioned, and started running Jupyter Notebook from Anaconda Navigator. I don’t get the errors of the cache misses now, but it just throws a warning: could not import on the same 15 dependencies. More specifically, the errors say that it “failed to precompile” the 15 dependencies, and I also get several warnings that certain functions could not be imported to NonlinearSolve.

Thank you for your reply and I really appreciate any help.

Can you copy paste the error from the REPL?

Here is the error for when I try to precompile the project:
Precompiling project…
✗ NonlinearSolve
✗ NonlinearSolve → NonlinearSolveNLsolveExt
✗ NonlinearSolve → NonlinearSolveBandedMatricesExt
✗ OrdinaryDiffEqNonlinearSolve
✗ StochasticDiffEq
✗ OrdinaryDiffEqFIRK
✗ OrdinaryDiffEqSDIRK
✗ OrdinaryDiffEqPDIRK
✗ OrdinaryDiffEqIMEXMultistep
✗ OrdinaryDiffEqStabilizedIRK
✗ OrdinaryDiffEqBDF
✗ OrdinaryDiffEqDefault
✗ OrdinaryDiffEq
✗ DelayDiffEq
✗ DifferentialEquations
0 dependencies successfully precompiled in 147 seconds. 631 already precompiled.
15 dependencies errored.

and the error for when I try to use the “using DifferentialEquations” line:

[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
WARNING: could not import DiffEqBase.AbstractNonlinearTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.AbstractSafeBestNonlinearTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.AbsNormTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.AbsSafeBestTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.AbsSafeTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.AbsTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.NormTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.RelNormTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.RelSafeBestTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.RelSafeTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.RelTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.SimpleNonlinearSolveTerminationMode into NonlinearSolve
WARNING: could not import DiffEqBase.SteadyStateDiffEqTerminationMode into NonlinearSolve
ERROR: LoadError: UndefVarError: AbstractNonlinearTerminationMode not defined in NonlinearSolve
Stacktrace:
[1] top-level scope
@ C:\Users\Amelia.julia\packages\NonlinearSolve\sBl1H\src\internal\termination.jl:11
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:557
[3] include(x::String)
@ NonlinearSolve C:\Users\Amelia.julia\packages\NonlinearSolve\sBl1H\src\NonlinearSolve.jl:1
[4] top-level scope
@ C:\Users\Amelia.julia\packages\NonlinearSolve\sBl1H\src\NonlinearSolve.jl:83
[5] include
@ .\Base.jl:557 [inlined]
[6] 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, UInt128}}, source::String)
@ Base .\loading.jl:2881
[7] top-level scope
@ stdin:6
in expression starting at C:\Users\Amelia.julia\packages\NonlinearSolve\sBl1H\src\internal\termination.jl:11
in expression starting at C:\Users\Amelia.julia\packages\NonlinearSolve\sBl1H\src\NonlinearSolve.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile NonlinearSolve [8913a72c-1f9b-4ce2-8d82-65094dcecaec] to “C:\Users\Amelia\.julia\compiled\v1.11\NonlinearSolve\jl_41BC.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
@ Base .\loading.jl:3174
[3] (::Base.var"#1110#1111"{Base.PkgId})()
@ Base .\loading.jl:2579
[4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3698
[10] maybe_cachefile_lock
@ .\loading.jl:3695 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2565
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2388
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2375
[16] macro expansion
@ .\loading.jl:2314 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260
[22] include
@ .\Base.jl:557 [inlined]
[23] 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, UInt128}}, source::String)
@ Base .\loading.jl:2881
[24] top-level scope
@ stdin:6
in expression starting at C:\Users\Amelia.julia\packages\OrdinaryDiffEqNonlinearSolve\e4hoO\src\OrdinaryDiffEqNonlinearSolve.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile OrdinaryDiffEqNonlinearSolve [127b3ac7-2247-4354-8eb6-78cf4e7c58e8] to “C:\Users\Amelia\.julia\compiled\v1.11\OrdinaryDiffEqNonlinearSolve\jl_3CDA.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
@ Base .\loading.jl:3174
[3] (::Base.var"#1110#1111"{Base.PkgId})()
@ Base .\loading.jl:2579
[4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3698
[10] maybe_cachefile_lock
@ .\loading.jl:3695 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2565
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2388
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2375
[16] macro expansion
@ .\loading.jl:2314 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260
[22] include
@ .\Base.jl:557 [inlined]
[23] 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, UInt128}}, source::String)
@ Base .\loading.jl:2881
[24] top-level scope
@ stdin:6
in expression starting at C:\Users\Amelia.julia\packages\StochasticDiffEq\5eZ6m\src\StochasticDiffEq.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile StochasticDiffEq [789caeaf-c7a9-5a7d-9973-96adeb23e2a0] to “C:\Users\Amelia\.julia\compiled\v1.11\StochasticDiffEq\jl_36BF.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
@ Base .\loading.jl:3174
[3] (::Base.var"#1110#1111"{Base.PkgId})()
@ Base .\loading.jl:2579
[4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3698
[10] maybe_cachefile_lock
@ .\loading.jl:3695 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2565
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2388
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2375
[16] macro expansion
@ .\loading.jl:2314 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260
[22] include
@ .\Base.jl:557 [inlined]
[23] 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, UInt128}}, source::Nothing)
@ Base .\loading.jl:2881
[24] top-level scope
@ stdin:6
in expression starting at C:\Users\Amelia.julia\packages\DifferentialEquations\eQbP8\src\DifferentialEquations.jl:1
in expression starting at stdin:6
Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to “C:\Users\Amelia\.julia\compiled\v1.11\DifferentialEquations\jl_38F3.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
@ Base .\loading.jl:3174
[3] (::Base.var"#1110#1111"{Base.PkgId})()
@ Base .\loading.jl:2579
[4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\Amelia.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3698
[10] maybe_cachefile_lock
@ .\loading.jl:3695 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2565
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2388
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2375
[16] macro expansion
@ .\loading.jl:2314 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260

Just to rule out a few things:

  • what is your OS (can you paste the output of the Julia function versioninfo())?
  • does it work if you just start a REPL in the terminal? e.g. open a bash/PowerShell/… window and type juliaand copy-paste the code you are normally executing in Jupyter
  • from within Jupyter, what is the output of DEPOT_PATH and what happens when you rename the folder that is shown (something ending in .../.julia) and restart the kernel? Does it still throw the same errors?

Hi,

  1. the output of versioninfo() is
    Julia Version 1.11.4
    Commit 8561cc3d68 (2025-03-10 11:36 UTC)
    Build Info:
    Official https://julialang.org/ release
    Platform Info:
    OS: Windows (x86_64-w64-mingw32)
    CPU: 12 × AMD Ryzen 5 5500
    WORD_SIZE: 64
    LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
    Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores).
  2. When I start the REPL in the terminal and try the “using DifferentialEquations” term, I get the same errors.
  3. The following is the output of DEPOT_PATH,
    3-element Vector{String}:
    “C:\Users\Amelia\.julia”
    “C:\Users\Amelia\.julia\juliaup\” ⋯ 17 bytes ⋯ “4.w64.mingw32\local\share\julia”
    “C:\Users\Amelia\.julia\juliaup\julia-1.11.4+0.x64.w64.mingw32\share\julia”
    I’m not sure if I fully understood your instructions but I don’t think anything changed.

Thank you!

1 Like

Can you share ]st?

Status C:\Users\Amelia\.julia\environments\v1.11\Project.toml
⌃ [13f3f980] CairoMakie v0.12.18
[1130ab10] DiffEqParamEstim v2.2.0
[0c46a032] DifferentialEquations v7.16.1
[af5da776] GlobalSensitivity v2.7.0
[7073ff75] IJulia v1.27.0
⌃ [8913a72c] NonlinearSolve v3.15.1
[7f7a1694] Optimization v4.1.2
[3e6eede4] OptimizationBBO v0.4.0
[36348300] OptimizationOptimJL v0.4.1
[91a5bcdd] Plots v1.40.11
[3fca794e] ProfileLikelihood v0.4.1
[8a4e6c94] QuasiMonteCarlo v0.3.3
[10745b16] Statistics v1.11.1
Info Packages marked with ⌃ have new versions available and may be upgradable.

It looks like your versions are a bit out of sync because of some bounds issues we have to handle, + ProfileLikelihood.jl just not having been updated in a long time. Can you try removing ProfileLilkelihood and the ]up?

Hi,

That worked! Thank you so much, I really appreciate all your help you actually saved me.

I’m very new to Julia but I’m glad to see what a supportive community there is!

Truly, thank you!

2 Likes