When I call
pkg> update JuMP, I only get version v0.19.2, while the latest stable release listed at Juliaopt.org is v0.21. I’d like to use some features that started in v0.20.
When I call
The problem is probably that you have some older version of other package (like a solver) that depends on 0.19 and therefore disallows the update.
I think the easiest way to debug is to do:
pkg> add JuMP@0.21
And see the error that will probably arise. The error will tell which packages conflict which this version of JuMP.
Thanks, that does seem to be what’s going on. I’ve updated the Gurobi package and still get the error that it’s incompatible. However, Gurobi is on the list of solvers in the installation guide for JuMP v0.21.
(v1.1) pkg> add JuMP@0.21 Resolving package versions... ERROR: Unsatisfiable requirements detected for package MathOptInterface [b8f27783]: MathOptInterface [b8f27783] log: ├─possible versions are: [0.5.0-0.5.1, 0.6.0-0.6.4, 0.7.0, 0.8.0-0.8.4, 0.9.0-0.9.13] or uninstalled ├─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.9.10-0.9.13 │ └─JuMP [4076af6c] log: │ ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.2] or uninstalled │ └─restricted to versions 0.21 by an explicit requirement, leaving only versions 0.21.0-0.21.2 └─restricted by compatibility requirements with LinQuadOptInterface [f8899e07] to versions: 0.8.0-0.8.4 — no versions left └─LinQuadOptInterface [f8899e07] log: ├─possible versions are: [0.3.0-0.3.1, 0.4.0-0.4.3, 0.5.0, 0.6.0] or uninstalled └─restricted by compatibility requirements with Gurobi [2e9cd046] to versions: 0.6.0 └─Gurobi [2e9cd046] log: ├─possible versions are: [0.5.0-0.5.9, 0.6.0, 0.7.0-0.7.6] or uninstalled └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0
If you read the output carefully, you will see that:
- You seem to have restricted
0.6.0that is NOT the last version of
- The problem is that
LinQuadOptInterfaceis restricting the versions of
LinQuadOptInterfaceseems to have been inherited from an older state of your environment, it is not needed for the last versions of
Gurobi, do you need it?
I didn’t specifically install
LinQuadOptInterface - presumably it came with Gurobi or another solver package. I’m not trying to restrict any packages to certain versions and don’t understand what I should be doing to resolve this.
LinQuadOptInterface and try again:
Pkg> rm LinQuadOptInterface Pkg> add JuMP@0.21
If it yet do not work, the dirty but fast way (i.e., should not be necessary, but if you are a begginer it is easier than trying to read the output, that I admit, is a little bit arcane) for solving it is removing all packages in your environment and installing just what you need, i.e.:
Pkg> st # look at everything you have installed Pkg> rm ... # names of everything you have installed Pkg> add JuMP@0.21 Gurobi # and any other packages you are sure you need
I think there must be more to it.
LinQuadOptInterface is definitely used by Gurobi and other solvers I use (see here), but it’s not something I can see the status of or remove.
pkg> remove LinQuadOptInterface ┌ Warning: `LinQuadOptInterface` not in project, ignoring └ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1131 [ Info: No changes
If you see here,
LinQuadOptInterface is not directly used by the last version of
Gurobi.jl, more than that, I have an environment with
Gurobi installed and:
(@v1.4) pkg> activate . (examples) pkg> st -m [...] [2e9cd046] Gurobi v0.7.6 [...] [4076af6c] JuMP v0.21.2 [...] [b77e0a4c] InteractiveUtils [76f85450] LibGit2 [8f399da3] Libdl [37e2e46d] LinearAlgebra [56ddb016] Logging [d6f4376e] Markdown
Note that the list is complete (option
-m is being used) and it is ordered by alphabetical order, so I have no package
Did you try to remove everything (except
LinQuadOptInterface as it seems to not exist) and reinstall just what you need? More than that, try to add
Gurobi@0.7.6 to your project to check if it is allowed. You can also execute
gc before (garbage collector of the Pkg) to remove unused packages, with any luck it will be able to remove
LinQuadOptInterface that seems to be on limbo.
If everything else fails, you can always start again from a fresh
~/.julia, make a backup of your old environment (
mv ~/.julia ~/.julia_old), delete your project Manifest file (
rm Manifest.toml), and instantiate the project again:
julia> import Pkg julia> Pkg.activate(".") julia> Pkg.instantiate()
But it is also nice to check if your
Project.toml has no
[compat] section forcing the use of specific versions, nor it does mention
What worked for me in the end was removing Gurobi, updating JuMP (which then did update to v21), and then re-adding Gurobi (which installed as v.0.7.6).
hi, i’d like to use Gurobiv0.6.0 but i got something wrong
Building Gurobi → `C:\Users\duyanran\.julia\packages\Gurobi\dlJep\deps\build.log` ┌ Error: Error building `Gurobi`: │ ERROR: LoadError: Unable to locate Gurobi installation. Note that this must be downloaded separately from gurobi.com │ Stacktrace: │  error(::String) at .\error.jl:33 │  top-level scope at C:\Users\duyanran\.julia\packages\Gurobi\dlJep\deps\build.jl:62 │  include(::String) at .\client.jl:439 │  top-level scope at none:5 │ in expression starting at C:\Users\duyanran\.julia\packages\Gurobi\dlJep\deps\build.jl:61 └ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:899``` can you tell me which version of Gurobi you install ? i think i should install another version of it ,thanks!!
I guess this is to do with your attempts to run Pajarito: run convex with pajarito？(try to solve misdp with complex variable) · Issue #438 · jump-dev/Convex.jl · GitHub
You should be able to use
] add Gurobi@0.8 instead. However, you will need an old copy of Gurobi (the solver). One of these should work: Gurobi 8.0, 8.1, or 9.0 (not 9.1).
Here are the installation instructions: GitHub - jump-dev/Gurobi.jl at v0.8.1
If you’re still struggling after this, please open a new post, rather than continuing this thread.