Hello…I’m getting the following error while trying to add MathOptInterface:
Pkg.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
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?
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
julia
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.
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.