Error installing Pajarito solver

Hi, I was trying to add Pajarito package to my Julia but I was getting this error. My JuMP version is 0.20.1

pkg> add Pajarito
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
JuMP [4076af6c] log:
├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1] or uninstalled
├─restricted to versions 0.20.1 by an explicit requirement, leaving only versions 0.20.1
└─restricted by compatibility requirements with Pajarito [2f354839] to versions: 0.18.3-0.18.6 — no versions left
└─Pajarito [2f354839] log:
├─possible versions are: 0.6.1 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions 0.6.1

I tried to uninstall JuMP and add an older version by

julia> Pkg.rm(“JuMP”)
Updating C:\tmp\CleanEnv\Project.toml
[4076af6c] - JuMP v0.20.1
Updating C:\tmp\CleanEnv\Manifest.toml

pkg> add JuMP@0.18.6
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
JuMP [4076af6c] log:
├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1] or uninstalled
├─restricted to versions 0.18.6 by an explicit requirement, leaving only versions 0.18.6
└─restricted by compatibility requirements with PowerModels [c36e90e8] to versions: [0.19.1-0.19.2, 0.20.0-0.20.1] — no versions left
└─PowerModels [c36e90e8] log:
├─possible versions are: [0.8.0-0.8.3, 0.8.7-0.8.8, 0.9.0-0.9.8, 0.10.0-0.10.1, 0.11.0-0.11.2, 0.12.0-0.12.5, 0.13.0-0.13.2, 0.14.0-0.14.3] or uninstalled
└─restricted to versions 0.14.3 by an explicit requirement, leaving only versions 0.14.3

Can anyone please help me to solve it?
Thanks a lot.

Pajarito only works on JuMP 0.18 (although the next version of JuMP will re-introduce callbacks and allow Pajarito to be updated), so you are halfway there with add JuMP@0.18.6 :slight_smile:.

The missing step is that PowerModels is holding you back. You should remove PowerModels rm PowerModels, then add JuMP@0.18, then Pajarito, then re-add PowerModels.

The problem is that the Julia package manager isn’t clever enough to work out that it should use an old version of PowerModels in order to let you use JuMP@0.18.6. (This is usually the correct decision to avoid people getting out-dated versions accidentally; the difference is this time you intended it.)