`DifferentialEquations.jl` and `KrylovKit.jl` not playing nice together

I cannot get the above-mentioned two packages to work together. If I have one of them installed, the other one does not install (apparently an issue with LinearSolve and DiffEqArrayOperator.

I tested this to be the case because either of them install fine (after removing both) and also if I create a temporary environment, either of them install just fine on their own!

Can someone help me out please? Thanks.

Edit:

  1. versioninfo()
Julia Version 1.11.4
Commit 8561cc3d68d (2025-03-10 11:36 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 56 Γ— Intel(R) Xeon(R) Gold 6258R CPU @ 2.70GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, cascadelake)
Threads: 1 default, 0 interactive, 1 GC (on 56 virtual cores)
  1. ]st
Status `~/.julia/environments/v1.11/Project.toml`
  [336ed68f] CSV v0.10.15
βŒƒ [13f3f980] CairoMakie v0.12.18
  [5a033b19] CurveFit v0.6.1
  [a93c6f00] DataFrames v1.7.0
  [0c46a032] DifferentialEquations v7.16.1
  [31c24e10] Distributions v0.25.120
  [ffbed154] DocStringExtensions v0.9.5
  [d4d017d3] ExponentialUtilities v1.27.0
  [7a1cc6ca] FFTW v1.9.0
  [7073ff75] IJulia v1.28.1
  [b964fa9f] LaTeXStrings v1.4.0
  [7a12625a] LinearMaps v3.11.4
βŒ… [ee78f7c6] Makie v0.21.18
  [8314cec4] PGFPlotsX v1.6.2
  [f07625cc] PauliStrings v1.6.1
  [f0f68f2c] PlotlyJS v0.18.16
  [91a5bcdd] Plots v1.40.13
  [08abe8d2] PrettyTables v2.4.0
  [49802e3a] ProgressBars v1.5.1
  [d330b81b] PyPlot v2.11.6
  [ae5ea0c6] Quantica v1.2.0
  [78ae1a1f] QuantumLattices v0.12.2
βŒ… [c0aeaf25] SciMLOperators v0.3.13
  [6aa5eb33] TaylorSeries v0.20.1
  [811555cd] ThreadPinning v1.0.2
  [8603256b] ZChop v0.3.11
  [37e2e46d] LinearAlgebra v1.11.0
  [de0858da] Printf v1.11.0
  [9a3f8284] Random v1.11.0
  [2f01184e] SparseArrays v1.11.0
Info Packages marked with βŒƒ and βŒ… have new versions available. Those with βŒƒ may be upgradable, but those with βŒ… are restricted by compatibility constraints from upgrading. To see why use `status --outdated`
  1. Adding KrylovKit.jl after DifferentialEquations.jl is already installed in my main environment shows the following log. For some reason, I don’t see any issues when I install these packages together in a temporary environment. Notably KrylovKit.jl removes many important dependencies during the install. Also, in the temporary environment the version of KrylovKit.jl that installs is v0.9.5 while in the main environment it is v0.7.1 while the version of DifferentialEquations.jl is same for both environments v7.16.1 - is this older version of KrylovKit.jl perhaps the issue?
(@v1.11) pkg> add KrylovKit
   Resolving package versions...
    Updating `~/.julia/environments/v1.11/Project.toml`
βŒƒ [0b1a1467] + KrylovKit v0.7.1
    Updating `~/.julia/environments/v1.11/Manifest.toml`
  [a95523ee] - AlmostBlockDiagonals v0.1.10
βŒƒ [764a87c0] ↓ BoundaryValueDiffEq v5.18.0 β‡’ v5.9.1
  [7227322d] - BoundaryValueDiffEqAscher v1.7.0
  [56b672f2] - BoundaryValueDiffEqCore v1.10.0
  [85d9eb09] - BoundaryValueDiffEqFIRK v1.8.0
  [1a22d4ce] - BoundaryValueDiffEqMIRK v1.8.0
  [9255f1d6] - BoundaryValueDiffEqMIRKN v1.7.0
  [ed55bfe0] - BoundaryValueDiffEqShooting v1.8.0
  [70df07ce] - BracketingNonlinearSolve v1.3.0
βŒƒ [bcd4f6db] ↓ DelayDiffEq v5.53.1 β‡’ v5.48.1
βŒ… [a0c0ee7d] ↓ DifferentiationInterface v0.6.52 β‡’ v0.6.26
βŒƒ [f151be2c] ↓ EnzymeCore v0.8.11 β‡’ v0.7.8
  [442a2c76] - FastGaussQuadrature v1.0.2
  [29a986be] + FastLapackInterface v2.0.4
βŒ… [f6369f11] ↓ ForwardDiff v1.0.1 β‡’ v0.10.38
  [3e5b6fbb] + HostCPUFeatures v0.1.17
  [ef3ab10e] + KLU v0.6.0
βŒ… [ba0b0d4f] ↓ Krylov v0.10.1 β‡’ v0.9.10
βŒƒ [0b1a1467] + KrylovKit v0.7.1
  [87fe0de2] - LineSearch v0.1.4
βŒ… [7ed4a6bd] ↓ LinearSolve v3.17.0 β‡’ v2.30.1
  [bdcacae8] + LoopVectorization v0.12.172
βŒƒ [d41bc354] ↓ NLSolversBase v7.10.0 β‡’ v7.8.3
βŒ… [8913a72c] ↓ NonlinearSolve v4.9.0 β‡’ v3.14.0
  [be0214bd] - NonlinearSolveBase v1.8.0
  [5959db7a] - NonlinearSolveFirstOrder v1.5.0
  [9a2c21bd] - NonlinearSolveQuasiNewton v1.5.0
  [26075421] - NonlinearSolveSpectralMethods v1.2.0
βŒƒ [429524aa] ↓ Optim v1.12.0 β‡’ v1.11.0
βŒƒ [1dea7af3] ↓ OrdinaryDiffEq v6.98.0 β‡’ v6.87.0
  [89bda076] - OrdinaryDiffEqAdamsBashforthMoulton v1.2.0
  [6ad6398a] - OrdinaryDiffEqBDF v1.6.0
  [50262376] - OrdinaryDiffEqDefault v1.4.0
  [4302a76b] - OrdinaryDiffEqDifferentiation v1.10.0
  [9286f039] - OrdinaryDiffEqExplicitRK v1.1.0
  [e0540318] - OrdinaryDiffEqExponentialRK v1.4.0
  [becaefa8] - OrdinaryDiffEqExtrapolation v1.5.0
  [5960d6e9] - OrdinaryDiffEqFIRK v1.12.0
  [101fe9f7] - OrdinaryDiffEqFeagin v1.1.0
  [d3585ca7] - OrdinaryDiffEqFunctionMap v1.1.1
  [d28bc4f8] - OrdinaryDiffEqHighOrderRK v1.1.0
  [9f002381] - OrdinaryDiffEqIMEXMultistep v1.3.0
  [521117fe] - OrdinaryDiffEqLinear v1.3.0
  [1344f307] - OrdinaryDiffEqLowOrderRK v1.2.0
  [b0944070] - OrdinaryDiffEqLowStorageRK v1.3.0
  [127b3ac7] - OrdinaryDiffEqNonlinearSolve v1.10.0
  [c9986a66] - OrdinaryDiffEqNordsieck v1.1.0
  [5dd0a6cf] - OrdinaryDiffEqPDIRK v1.3.1
  [5b33eab2] - OrdinaryDiffEqPRK v1.1.0
  [04162be5] - OrdinaryDiffEqQPRK v1.1.0
  [af6ede74] - OrdinaryDiffEqRKN v1.1.0
  [43230ef6] - OrdinaryDiffEqRosenbrock v1.11.0
  [2d112036] - OrdinaryDiffEqSDIRK v1.3.0
  [669c94d9] - OrdinaryDiffEqSSPRK v1.3.0
  [e3e12d00] - OrdinaryDiffEqStabilizedIRK v1.3.0
  [358294b1] - OrdinaryDiffEqStabilizedRK v1.1.0
  [fa646aed] - OrdinaryDiffEqSymplecticRK v1.3.0
  [b1df2697] - OrdinaryDiffEqTsit5 v1.1.0
  [79d7bb75] - OrdinaryDiffEqVerner v1.2.0
  [65ce6f38] + PackageExtensionCompat v1.0.2
  [f2c3362d] + RecursiveFactorization v0.2.23
  [476501e8] + SLEEFPirates v0.6.43
  [19f34311] - SciMLJacobianOperators v0.1.5
βŒ… [727e6d20] ↓ SimpleNonlinearSolve v2.5.0 β‡’ v1.12.5
  [9f842d2f] - SparseConnectivityTracer v0.6.20
  [47a9eef4] + SparseDiffTools v2.26.0
  [0a514795] - SparseMatrixColorings v0.4.20
  [e56a9233] + Sparspak v0.3.11
βŒƒ [9672c7b4] ↓ SteadyStateDiffEq v2.5.0 β‡’ v2.4.1
βŒƒ [789caeaf] ↓ StochasticDiffEq v6.80.0 β‡’ v6.72.1
  [d5829a12] + TriangularSolve v0.2.1
βŒ… [409d34a3] + VectorInterface v0.4.9
  [3d5dd08c] + VectorizationBase v0.21.71
  [19fa3120] + VertexSafeGraphs v0.2.0
        Info Packages marked with βŒƒ and βŒ… have new versions available. Those with βŒƒ may be upgradable, but those with βŒ… are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
Precompiling project...
  Progress [========================================>]  23/23
  βœ“ DifferentiationInterface
  βœ“ NLSolversBase
  βœ“ DifferentiationInterface β†’ DifferentiationInterfaceForwardDiffExt
  βœ“ DifferentiationInterface β†’ DifferentiationInterfaceFiniteDiffExt
  βœ“ DifferentiationInterface β†’ DifferentiationInterfaceStaticArraysExt
  βœ“ DifferentiationInterface β†’ DifferentiationInterfaceChainRulesCoreExt
  βœ“ DifferentiationInterface β†’ DifferentiationInterfaceSparseArraysExt
  βœ— LinearSolve
  βœ— SteadyStateDiffEq
  βœ“ SimpleNonlinearSolve
  βœ“ Optim
  βœ— LinearSolve β†’ LinearSolveBandedMatricesExt
  βœ— LinearSolve β†’ LinearSolveFastAlmostBandedMatricesExt
  βœ— LinearSolve β†’ LinearSolveKrylovKitExt
  βœ— LinearSolve β†’ LinearSolveRecursiveArrayToolsExt
  βœ“ SimpleNonlinearSolve β†’ SimpleNonlinearSolveChainRulesCoreExt
  βœ— NonlinearSolve
  βœ— NonlinearSolve β†’ NonlinearSolveBandedMatricesExt
  βœ— NonlinearSolve β†’ NonlinearSolveNLsolveExt
  βœ— OrdinaryDiffEq
  βœ— DelayDiffEq
  βœ— StochasticDiffEq
  βœ— BoundaryValueDiffEq
  10 dependencies successfully precompiled in 161 seconds. 582 already precompiled.
  10 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions. Otherwise, loading dependents of these packages may trigger further precompilation to work with the unexpected versions.

Seems to be working for me. What does ]st show? (also versioninfo() might be nice)

1 Like

My bad, edited the post to include both of those - ]st doesn’t show KrylovKit as I removed it - but there’s an older version of it that gets installed (see point 3 of the edited post).

Interestingly, I just tried to install both packages together (and nothing else) in a temporary project, ] activate temp; add KrylovKit; add DifferentialEquations and it worked!

But when I try to do this in my main environment, if one of them is installed the other refuses to install due to an issue with LinearSolve (among others). I’m attaching the log on the main post as well.

What happens if you ]add SciMLOperators@1?

apparently, the problem was with another package Quantica.jl - having it installed forces KrylovKit.jl to install an older version which is incompatible with DifferentialEquations.jl… removing Quantica.jl let me install both KrylovKit.jl and DifferentialEquations.jl simultaneously without issues!

1 Like