Cannot add DifferentialEquations

Trying to add DifferentialEquations with DynamicalSystems installed results in a package requirements error in 0.6.2:

julia> Pkg.add("DifferentialEquations")
ERROR: resolve is unable to satisfy package requirements.
  The problem was detected when trying to find a feasible version
  for package DynamicalSystemsBase.
  However, this only means that package DynamicalSystemsBase is involved in an
  unsatisfiable or difficult dependency relation, and the root of
  the problem may be elsewhere.
  (you may try increasing the value of the JULIA_PKGRESOLVE_ACCURACY
   environment variable)

resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}) at ./pkg/resolve.jl:48
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at ./pkg/entry.jl:499
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at ./pkg/entry.jl:479
edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at ./pkg/entry.jl:30
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335
Stacktrace:
 [1] sync_end() at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 [2] macro expansion at ./task.jl:303 [inlined]
 [3] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
 [4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
 [5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
 [6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
 [7] add(::String) at ./pkg/pkg.jl:117

If I rm DynamicalSystems and try to add DifferentialEquations, Julia says that offending package is DiffEqUncertainty.

(what’s the proper etiquette for these things, first posting here or directly opening an issue in GitHub?)

The package resolver just isn’t able to find out what the problem package is, but it’s not one of those two. What’s your Pkg.status()? Maybe I will see something, but this can be a really hard to problem to resolve. My best guess is that something is upper bounding Optim.jl or NLsolve.jl due to its most recent changes, and those upper bounds are affecting DifferentialEquations.jl

julia> Pkg.status()
43 required packages:
 - AmplNLWriter                  0.4.0
 - Atom                          0.6.8
 - BenchmarkTools                0.2.4
 - CoinOptServices               0.3.0
 - Conda                         0.7.1
 - DataFrames                    0.11.5
 - DataFramesMeta                0.3.0
 - Flux                          0.4.1
 - GLM                           0.10.1
 - GR                            0.25.0
 - Gurobi                        0.3.3
 - Hungarian                     0.1.2
 - IJulia                        1.6.2
 - Interact                      0.6.3
 - JLD                           0.8.3
 - JuMP                          0.18.0
 - JuliaDB                       0.5.0
 - KNITRO                        0.3.1
 - MLDataPattern                 0.3.0
 - Mosek                         0.8.2
 - Munkres                       0.1.1
 - NLsolve                       1.0.0
 - OffsetArrays                  0.4.2
 - OhMyREPL                      0.2.11
 - Optim                         0.12.0
 - Pajarito                      0.5.0
 - PlotRecipes                   0.3.0
 - Plotly                        0.1.1
 - PlotlyJS                      0.9.0
 - Plots                         0.15.0
 - PyCall                        1.15.0
 - PyPlot                        2.3.2
 - RCall                         0.10.1
 - RDatasets                     0.3.0
 - Revise                        0.1.1
 - SaferIntegers                 0.0.2
 - Stan                          2.0.2
 - StatFiles                     0.3.0
 - StatPlots                     0.6.0
 - StochDynamicProgramming       0.5.0
 - TensorFlow                    0.8.0
 - TimerOutputs                  0.3.1
 - XGBoost                       0.2.0
151 additional packages:
 - ASTInterpreter2               0.1.1
 - AbstractFFTs                  0.2.1
 - Adapt                         0.2.0
 - AutoHashEquals                0.2.0
 - AxisAlgorithms                0.2.0
 - AxisArrays                    0.2.0
 - BinDeps                       0.8.6
 - Blink                         0.6.0
 - Blosc                         0.3.0
 - BufferedStreams               0.3.3
 - CSV                           0.2.1
 - Calculus                      0.2.2
 - CategoricalArrays             0.3.3
 - Cbc                           0.3.2
 - Clp                           0.3.1
 - CodeTools                     0.4.7
 - CodecZlib                     0.4.2
 - Codecs                        0.4.0
 - ColorTypes                    0.6.6
 - Colors                        0.8.2
 - CommonSubexpressions          0.0.1
 - Compat                        0.49.0
 - ConicBenchmarkUtilities       0.2.3
 - ConicNonlinearBridge          0.1.3
 - Contour                       0.4.0
 - Crayons                       0.4.1
 - CutPruners                    0.0.2
 - DSP                           0.3.4
 - Dagger                        0.5.1
 - DataArrays                    0.7.0
 - DataFlow                      0.3.0
 - DataStreams                   0.3.4
 - DataStructures                0.7.4
 - DataValues                    0.3.1
 - DebuggerFramework             0.1.2
 - DiffBase                      0.3.2
 - DiffEqDiffTools               0.3.0
 - DiffResults                   0.0.3
 - DiffRules                     0.0.3
 - Distances                     0.5.0
 - Distributions                 0.15.0
 - DocSeeker                     0.1.0
 - DocStringExtensions           0.4.3
 - Documenter                    0.13.1
 - DualNumbers                   0.3.0
 - FFTW                          0.0.4
 - FileIO                        0.6.1
 - FixedPointNumbers             0.4.3
 - ForwardDiff                   0.7.2
 - GZip                          0.3.0
 - GeometryTypes                 0.4.4
 - Glob                          1.1.1
 - HDF5                          0.8.8
 - Hiccup                        0.1.1
 - Homebrew                      0.6.1
 - HttpCommon                    0.3.0
 - HttpParser                    0.3.0
 - HttpServer                    0.2.0
 - IndexedTables                 0.5.0
 - Interpolations                0.7.3
 - IntervalSets                  0.1.1
 - Ipopt                         0.2.6
 - IterTools                     0.2.1
 - IterableTables                0.6.1
 - IteratorInterfaceExtensions   0.0.2
 - JSON                          0.16.4
 - Juno                          0.4.0
 - KernelDensity                 0.4.0
 - LNR                           0.0.2
 - LaTeXStrings                  0.3.0
 - Lazy                          0.12.0
 - LearnBase                     0.1.6
 - LegacyStrings                 0.3.0
 - Libz                          0.2.4
 - LightGraphs                   0.11.1
 - LightXML                      0.5.0
 - LineSearches                  3.2.5
 - Loess                         0.3.0
 - Logging                       0.3.1
 - LossFunctions                 0.2.0
 - MLLabelUtils                  0.2.0
 - MNIST                         0.0.2
 - MacroTools                    0.4.0
 - MappedArrays                  0.0.7
 - MarriageMarkets               0.0.0-             master (unregistered)
 - MathLink                      0.0.0-             master
 - MathProgBase                  0.6.4
 - MbedTLS                       0.5.5
 - Measures                      0.1.0
 - Media                         0.3.0
 - MemPool                       0.0.5
 - Missings                      0.2.5
 - Mustache                      0.3.0
 - Mux                           0.2.3
 - NLSolversBase                 4.2.0
 - NLopt                         0.3.6
 - NNlib                         0.2.2
 - NaNMath                       0.3.0
 - NamedTuples                   4.0.0
 - NetworkLayout                 0.1.1
 - Nullables                     0.0.3
 - OnlineStats                   0.15.0
 - OnlineStatsBase               0.4.1
 - PDMats                        0.8.0
 - Parameters                    0.8.1
 - PenaltyFunctions              0.0.2
 - PlotThemes                    0.2.0
 - PlotUtils                     0.4.4
 - Polynomials                   0.2.1
 - PooledArrays                  0.1.1
 - PositiveFactorizations        0.1.0
 - Primes                        0.2.0
 - ProgressMeter                 0.5.3
 - ProtoBuf                      0.5.0
 - QuadGK                        0.2.0
 - QuantEcon                     0.14.1
 - RData                         0.3.0
 - RangeArrays                   0.2.0
 - Ratios                        0.2.0
 - Reactive                      0.6.0
 - ReadStat                      0.3.0
 - RecipesBase                   0.2.3
 - Reexport                      0.1.0
 - Requests                      0.5.1
 - Requires                      0.4.3
 - ReverseDiffSparse             0.8.1
 - Rmath                         0.3.2
 - SHA                           0.5.6
 - ShowItLikeYouBuildIt          0.2.0
 - Showoff                       0.1.1
 - SimpleTraits                  0.5.1
 - SortingAlgorithms             0.2.0
 - SpecialFunctions              0.3.8
 - StaticArrays                  0.6.6
 - StatsBase                     0.19.5
 - StatsFuns                     0.5.0
 - StatsModels                   0.2.2
 - StringDistances               0.2.0
 - Strs                          0.0.0-             master (unregistered)
 - SweepOperator                 0.1.0
 - TableTraits                   0.1.0
 - TableTraitsUtils              0.1.3
 - TakingBroadcastSeriously      0.1.1
 - TextParse                     0.3.5
 - Tokenize                      0.4.2
 - TranscodingStreams            0.4.1
 - URIParser                     0.3.0
 - WeakRefStrings                0.4.1
 - WebSockets                    0.4.0
 - WoodburyMatrices              0.2.2
 - ZMQ                           0.5.1

I don’t see it. Honestly, the only way I know to debug this is to remove .julia/v0.6 and add packages back one-by-one and see what downgrades it.

I guess I’ll try that. :frowning_face:

You can always try this How to find package preventing others from updating

Maybe this helps: I just got a similar problem when installing DifferentialEquations (in my case it complained about DiffEqDevTools). Increasing JULIA_PKGRESOLVE_ACCURACY to 3 (i.e. ENV["JULIA_PKGRESOLVE_ACCURACY"] = 3) solved the issue.

2 Likes

I’m having the same problem, though the “offending” package is DiffEqUncertainty. This problem occurred on my personal MacOS environment and a corporate Windows machine. Strangely, @AleMorales suggestion fixed the issue on Windows but not MacOS.

Try assigning a higher value to ENV["JULIA_PKGRESOLVE_ACCURACY"]. Today I had to use a value of 5 to resolve Pkg.add("Coverage"), I am not sure what is happening with the the dependencies lately, I never had this problem until 10 days ago. I think that the problem is going to depend on which packages (and which versions) you have installed on each machine.

1 Like

DiffEq added a bunch of upper bounds so that way the old syntax (t,u,du) would not mix with packages on the new syntax (du,u,p,t) since that would just be broken. However, it looks like that resolver is no able to easily find out that it can “jump up” to the next major version on all of these packages simultaneously. FWIW, fresh installations where you wipe .julia/v0.6 seem to work, though that’s quite a nuclear option.

1 Like

Thanks @AleMorales that worked!

Today, I can’t add DifferentialEquations even using a clean Julia installation. Setting the resolve accuracy to 3 doesn’t help.

julia> Pkg.update()
INFO: Initializing package repository /home/sebastian/.julia/v0.6
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.add("DifferentialEquations")
ERROR: resolve is unable to satisfy package requirements.
  The problem was detected when trying to find a feasible version
  for package DiffEqUncertainty.
  However, this only means that package DiffEqUncertainty is involved in an
  unsatisfiable or difficult dependency relation, and the root of
  the problem may be elsewhere.
  (you may try increasing the value of the JULIA_PKGRESOLVE_ACCURACY
   environment variable)

resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}) at ./pkg/resolve.jl:48
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}, ::Dict{String,VersionNumber}, ::Set{String}) at ./pkg/entry.jl:499
resolve(::Dict{String,Base.Pkg.Types.VersionSet}, ::Dict{String,Dict{VersionNumber,Base.Pkg.Types.Available}}, ::Dict{String,Tuple{VersionNumber,Bool}}, ::Dict{String,Base.Pkg.Types.Fixed}) at ./pkg/entry.jl:479
edit(::Function, ::String, ::Base.Pkg.Types.VersionSet, ::Vararg{Base.Pkg.Types.VersionSet,N} where N) at ./pkg/entry.jl:30
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335
Stacktrace:
 [1] macro expansion at ./task.jl:303 [inlined]
 [2] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
 [3] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
 [4] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
 [5] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N} where N) at ./pkg/dir.jl:36
 [6] add(::String) at ./pkg/pkg.jl:117
 [7] macro expansion at ./REPL.jl:97 [inlined]
 [8] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73

julia> Pkg.status()
No packages installed

@sebastian It should work now. METADATA in general had a resolver issue because of this…

https://github.com/JuliaLang/METADATA.jl/pull/13381

Yes, it works now. Thank you!

Silly me. On seeign this topic title I though that @amrods was desiring to add some differential equations together.

Someone bright will come along and tell me that this is a perfectly possible mathematical technique.

Since removing the packages and re-adding DiffEq was working for everyone, I decided that the least intrusive approach at this point was to simply remove the upper bounds.

https://github.com/JuliaLang/METADATA.jl/pull/13385

In theory you can get incompatible versions of packages, but in practice without upper bounds the resolver updates you to the latest versions and so this tends to work (while we know that the situation with the upper bounds doesn’t).

If you have any more issues, please let me know.

I am trying to install DifferentialEquations for my fresh install of JuliaPro, but I get the following error:

ERROR: Unsatisfiable requirements detected for package NLSolversBase:
(and many lines of info)

edit: I noticed that this error is related with NLsolve package, which is currently not listed after running Pkg.status(). Trying to add this package gives similar error.

I hope there is some easy way to work through it, as I wanted just to test the speed of Julia as compared to Matlab, but on JuliaBox solving speed was rather big…

Why not use a regular Julia installation? I think that the issue is because JuliaPro is fixing Optim.jl to an older version, which fixes NLSolversBase to an older version and makes it all incompatible.

Thanks for the asnwer.

I wanted to have some IDE.
I will see the regular Julia installation.
edit: With the regular, everything was ok.

You don’t need JuliaPro for the IDE. You just install Atom and install the uber-juno plugin.

On v0.6 we have no control over what packages they pin which can break the installation. On v0.7 this is fixed by Pkg3 environments.