Unsatisfiable requirements for package ForwardDiff

It seems I have run into a problem with having ReverseDiff and DifferentialEquations installed at the same time

julia> Pkg.status("ReverseDiff")
 - ReverseDiff                   0.1.4

julia> Pkg.status("ForwardDiff")
 - ForwardDiff                   0.4.2

julia> Pkg.status("DifferentialEquations")
 - DifferentialEquations         2.2.1

julia> versioninfo()
Julia Version 0.6.0
Commit 9036443 (2017-06-19 13:05 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)


ERROR: LoadError: LoadError: Unsatisfiable requirements detected for package ForwardDiff:
├─version range [0.3.2,0.5.0) required by package ReverseDiff, whose allowed version range is [0.0.0-,∞):
│ ├─version range [0.0.0-,∞) set by an explicit requirement
│ └─version range [0.0.0-,∞) required by package LTVModels, whose only allowed version is 0.0.0-:
  │ └─version 0.0.0- set by fixed requirement (package is checked out, dirty or pinned)
└─version range [0.5.0,∞) required by package StochasticDiffEq, whose allowed version range is [1.0.0,∞):
  └─version range [1.0.0,∞) required by package DifferentialEquations, whose allowed version range is [0.0.0-,∞):
    └─version range [0.0.0-,∞) set by an explicit requirement
The intersection of the requirements is empty.

Anyone with an idea regarding how to solve this issue without removing one of the packages?

Thanks!

ReverseDiff currently upper-bounds its ForwardDiff requirement at v0.5.0, so it’s incompatible with any versions of packages which have ForwardDiff v0.5.0 as a lower-bound requirement. I’m not a Pkg expert, though, so there might be some workaround I don’t know about.

ref https://github.com/JuliaDiff/ReverseDiff.jl/issues/72.

Do you have anything checked out or pinned? What’s Pkg.status() say? Only Celeste and Klara depend on ReverseDiff as far as I can tell, out of registered packages.

I have a few private packages that need ReverseDiff, unfortunately.

Then you’ll need to downgrade DifferentialEquations (or a few of its dependencies) to a version that works with ForwardDiff 0.4.x or earlier, if you want them to be installed and loaded simultaneously. Or check things out or locally modify the bounds, and see what happens - they were put there to avoid known incompatibilities from what I can recall, so this is probably not recommended.

And just to add, Optim, NLsolve, and the *DiffEq packages all use it. If you pin these you can expect the stiff solvers to fail when using autodiff but other things should be fine. The version compatibility is due to ForwardDiff’s perturbation-confusion tagging update, so we won’t be backtracking on that. The easiest thing would be a PR to ReverseDiff.jl to upgrade it :slight_smile: .

Thanks for your answers! I solved by downgrading since I didn’t use any fancy new capabilities. For future reference, is there an easy option to maintain several different versions of the same package X installed in different directories, and let packages which import X point to a version of their liking? I can dream up ways of manually accomplishing this, but hesitate to rely on this in the long run.

You can set up independent JULIA_PKGDIR locations with separate sets of versions, but you can’t load two different versions of the same package into the same Julia session at the same time. If you absolutely need to do that then maybe you could make a copy of one of the versions and locally rename it, but that’s pretty messy.