Error: Unsatisfiable requirements detected for package MathOptInterface

Hello…I’m getting the following error while trying to add MathOptInterface:


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.14] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [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.14]
 ├─restricted by compatibility requirements with Convex [f65535da] to versions: 0.9.0-0.9.14
 │ └─Convex [f65535da] log:
 │   ├─possible versions are: [0.8.0, 0.9.0-0.9.1, 0.10.0-0.10.1, 0.11.0-0.11.3, 0.12.0-0.12.7, 0.13.0-0.13.7] or uninstalled
 │   └─restricted to versions 0.13.3 by an explicit requirement, leaving only versions 0.13.3
 ├─restricted by compatibility requirements with Gurobi [2e9cd046] to versions: 0.9.9-0.9.14
 │ └─Gurobi [2e9cd046] log:
 │   ├─possible versions are: [0.5.0-0.5.9, 0.6.0, 0.7.0-0.7.7, 0.8.0-0.8.1] or uninstalled
 │   └─restricted to versions 0.8.0 by an explicit requirement, leaving only versions 0.8.0
 └─restricted by compatibility requirements with COSMO [1e616198] to versions: 0.8.0-0.8.4 — no versions left
   └─COSMO [1e616198] log:
     ├─possible versions are: [0.3.0-0.3.1, 0.4.0-0.4.4, 0.5.0, 0.6.0, 0.7.0-0.7.4] or uninstalled
     └─restricted to versions 0.4.1 by an explicit requirement, leaving only versions 0.4.1

Can someone help me resolve this?


It looks like you have Convex.jl, Gurobi.jl, and COSMO.jl all pinned to specific versions. Did you do that intentionally? Or are you perhaps using JuliaPro?

1 Like

No I haven’t done that intentionally…I’m not using JuliaPro either.

I don’t know why they are pinned to specific versions…

How do I change that?

Can you post your Pkg.status() output?

[537997a7] AbstractPlotting v0.10.6
  [c52e3926] Atom v0.12.11
  [fbb218c0] BSON v0.2.6
  [6e4b80f9] BenchmarkTools v0.5.0
  [1e616198] COSMO v0.4.1
  [336ed68f] CSV v0.6.2
  [c5f51814] CUDAdrv v6.3.0
  [be33ccc6] CUDAnative v3.1.0
  [593b3428] CmdStan v6.0.5
  [f65535da] Convex v0.13.3
  [3a865a2d] CuArrays v2.2.0
  [2445eb08] DataDrivenDiffEq v0.3.1
  [a93c6f00] DataFrames v0.21.0
  [82cc6244] DataInterpolations v2.0.1
  [2b5f629d] DiffEqBase v6.41.3
  [ebbdde9d] DiffEqBayes v2.15.0
  [eb300fae] DiffEqBiological v4.3.0
  [459566f4] DiffEqCallbacks v2.13.1
  [aae7a2af] DiffEqFlux v1.10.2
  [41bf760c] DiffEqSensitivity v6.14.2
  [0c46a032] DifferentialEquations v6.14.0
  [b4f34e82] Distances v0.8.2
  [31c24e10] Distributions v0.23.2
  [fa6b7ba4] DualNumbers v0.6.2
  [e2685f51] ECOS v0.11.0
  [587475ba] Flux v0.10.4
  [f6369f11] ForwardDiff v0.10.10
  [60bf3e95] GLPK v0.13.0
  [28b8d3ca] GR v0.48.0
  [891a1506] GaussianProcesses v0.12.1
  [2e9cd046] Gurobi v0.8.0
  [00e151f4] HPC_Create v0.1.0 [`C:\Users\Raj\.julia\dev\HPC_Create`]
  [7073ff75] IJulia v1.21.2
  [916415d5] Images v0.22.2
  [95701278] ImplicitEquations v0.6.0
  [42fd0dbc] IterativeSolvers v0.8.4
  [4138dd39] JLD v0.10.0
  [4076af6c] JuMP v0.21.2
  [e5e0dc1b] Juno v0.8.2
  [b964fa9f] LaTeXStrings v1.1.0
  [23fbe1c1] Latexify v0.13.2
  [2fda8390] LsqFit v0.8.1
  [23992714] MAT v0.8.0
  [c7f686f2] MCMCChains v3.0.12
  [5424a776] Mamba v0.12.4
  [442fdcdd] Measures v0.3.1
  [961ee093] ModelingToolkit v3.6.4
  [6405355b] Mosek v1.1.3
  [d4cf06d2] MyPackage v0.1.0 [`C:\Users\Raj\.julia\dev\MyPackage`]
  [5dbad481] MyPackagenew v0.1.0 [`C:\Users\Raj\.julia\dev\MyPackagenew`]
  [47be7bcc] ORCA v0.3.1
  [429524aa] Optim v0.20.6
  [1dea7af3] OrdinaryDiffEq v5.38.1
  [90014a1f] PDMats v0.9.12
  [8314cec4] PGFPlotsX v1.2.6
  [65888b18] ParameterizedFunctions v5.3.0
  [d96e819e] Parameters v0.12.1
  [14b8a8f1] PkgTemplates v0.6.4
  [f0f68f2c] PlotlyJS v0.13.1
  [91a5bcdd] Plots v0.29.9
  [f27b6e38] Polynomials v1.1.1
  [92933f4c] ProgressMeter v1.3.0
  [a725b495] ProximalOperators v0.10.3 #master (
  [d330b81b] PyPlot v2.9.0
  [1a8c2f83] Query v0.12.2
  [731186ca] RecursiveArrayTools v2.4.4
  [c946c3f1] SCS v0.6.6
  [d210fa52] SINDYPI_Julia v0.1.0 [`C:\Users\Raj\.julia\dev\SINDYPI_Julia`]
  [ca6142a6] SparseRegression v0.2.0
  [90137ffa] StaticArrays v0.12.3
  [2913bbd2] StatsBase v0.32.2
  [f3b207a7] StatsPlots v0.14.6
  [c3572dad] Sundials v4.2.2
  [9f7883ad] Tracker v0.2.6
  [fce5fe82] Turing v0.13.0
  [d6d074c3] VideoIO v0.7.0
  [44d3d7a6] Weave v0.10.0
  [e88e6eb3] Zygote v0.4.20
  [8bb1440f] DelimitedFiles
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random
  [9e88b42a] Serialization

Just posted it above^^

Ok, interesting. I’m confused why there are messages like restricted to versions 0.13.3 by an explicit requirement in your error output, since it looks like you don’t actually have any packages pinned to specific versions. I’m afraid someone who knows Pkg better than I do might have to answer that.

One option would be to create a new package environment for your current project. This will let you install anything you want without interfering with your globally installed packages. The way you do that is:

cd /path/to/your/project
pkg> activate .
pkg> add MathOptInterface 

That will create a new Project.toml in your current folder and will allow you to use whatever packages you add. You just need to remember to pkg> activate . when starting Julia from that folder to tell Julia to use the local environment.

1 Like

Thanks a ton for your reply :slight_smile:

I will try creating a new package environment

When trying to run activate . it gives the following error

ERROR: syntax: space before “.” not allowed in “activate .” at REPL[1]:1

You need to be in pkg mode when doing activate, press ] to get there. Or start with

julia --project


1 Like

Hey! I am using JuliaPro and encountered the same issue. How do you suggest I solve this issue?

Please open a new post with the error you are seeing, rather than extending this old one. Make sure to include the full output of the error message you see, as well as the command you tried to run.

I would recommend against using JuliaPro. It tends to have older versions of packages that can cause compatibility issues like this.

1 Like