Mosek.jl version 11 installation issue

Can someone please confirm whether Mosek.jl and MosekTools.jl support Mosek version 11?

I get the following message:

(@v1.11) pkg> add Mosek
   Resolving package versions...
   Installed Mosek ─ v10.2.0
  No Changes to `~/.julia/environments/v1.11/Project.toml`
  No Changes to `~/.julia/environments/v1.11/Manifest.toml`
    Building Mosek → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/3b3f443422b385733fcc52da0a8de8607cd85482/build.log`
ERROR: Error building `Mosek`:
[ Info: Got version: 11.0.12, expected version: 10.2
ERROR: LoadError: MOSEKBINDIR (/Users/singingkim/mosek/11.0/tools/platform/osxaarch64/bin/) does not point to a MOSEK 10.2 bin directory
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] top-level scope
   @ ~/.julia/packages/Mosek/cMwUF/deps/build.jl:157
 [3] include(fname::String)
   @ Main ./sysimg.jl:38
 [4] top-level scope
   @ none:5
in expression starting at /Users/singingkim/.julia/packages/Mosek/cMwUF/deps/build.jl:151
(@v1.11) pkg> status
Status `~/.julia/environments/v1.11/Project.toml`
  [336ed68f] CSV v0.10.15
⌅ [5ae59095] Colors v0.12.11
  [a93c6f00] DataFrames v1.7.0
  [31c24e10] Distributions v0.25.118
  [191a621a] Dualization v0.5.9
  [a2cc645c] GraphPlot v0.6.1
  [86223c79] Graphs v1.12.0
  [2e9cd046] Gurobi v1.7.1
  [b6b21f68] Ipopt v1.7.3
  [033835bb] JLD2 v0.5.11
  [4076af6c] JuMP v1.24.0
  [67920dd8] KNITRO v0.14.4
  [b964fa9f] LaTeXStrings v1.4.0
  [23992714] MAT v0.10.7
⌅ [6405355b] Mosek v10.2.0
  [1ec41992] MosekTools v0.15.5
  [8314cec4] PGFPlotsX v1.6.2
  [91a5bcdd] Plots v1.40.10
  [c36e90e8] PowerModels v0.21.3
  [017b0a0e] HSL_jll v2023.11.7+0 `../../../HSL_jll.jl-2023.11.7`
  [656ef2d0] OpenBLAS32_jll v0.3.29+0
  [2f01184e] SparseArrays v1.11.0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`
julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 14 × Apple M4 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 10 virtual cores)
Environment:
  LD_LIBRARY_PATH = :/Applications/GAMS25.1/sysdir:/Applications/CPLEX_Studio221/cplex/bin/x86-64_osx/:/Users/singingkim/knitro-14.2.0-ARM-MacOS/lib/:/usr/local/lib/
  DYLD_LIBRARY_PATH = /Users/singingkim/knitro-14.2.0-ARM-MacOS/lib/:

If you want to use Mosek in conjunction with JuMP, then presumably you want to use MosekTools.jl. I installed Mosek 10 on my laptop last year, and it works well. (I haven’t updated to version 11).

To use Mosek v11, you need to update Mosek.jl from

⌅ [6405355b] Mosek v10.2.0

to v11.0.0.

But it is currently blocked by MosekTools.jl, which we haven’t updated yet: Mosek v11 · Issue #153 · jump-dev/MosekTools.jl · GitHub

Could you try

import Pkg; Pkg.pkg"add MosekTools@#master"

then restart Julia.

Thanks @odow!
It works well after running add MosekTools#master.

julia> using Mosek

julia> using MosekTools

julia> using JuMP

julia> m = Model(Mosek.Optimizer)
A JuMP Model
├ solver: Mosek
├ objective_sense: FEASIBILITY_SENSE
├ num_variables: 0
├ num_constraints: 0
└ Names registered in the model: none

julia> optimize!(m)
Problem
  Name                   :
  Objective sense        : minimize
  Type                   : LO (linear optimization problem)
  Constraints            : 0
  Affine conic cons.     : 0
  Disjunctive cons.      : 0
  Cones                  : 0
  Scalar variables       : 0
  Matrix variables       : 0
  Integer variables      : 0

Optimizer started.
Presolve started.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00
Lin. dep.  - tries                  : 0                 time                   : 0.00
Lin. dep.  - primal attempts        : 0                 successes              : 0
Lin. dep.  - dual attempts          : 0                 successes              : 0
Lin. dep.  - primal deps.           : 0                 dual deps.             : 0
Presolve terminated. Time: 0.00
Optimizer terminated. Time: 0.00


julia> println(Mosek.getversion())
(11, 0, 12)

(@v1.11) pkg> status
Status `~/.julia/environments/v1.11/Project.toml`
  [336ed68f] CSV v0.10.15
⌅ [5ae59095] Colors v0.12.11
  [a93c6f00] DataFrames v1.7.0
  [31c24e10] Distributions v0.25.118
  [191a621a] Dualization v0.5.9
  [a2cc645c] GraphPlot v0.6.1
  [86223c79] Graphs v1.12.0
  [2e9cd046] Gurobi v1.7.2
  [b6b21f68] Ipopt v1.7.3
  [033835bb] JLD2 v0.5.11
  [4076af6c] JuMP v1.24.0
  [67920dd8] KNITRO v0.14.4
  [b964fa9f] LaTeXStrings v1.4.0
  [23992714] MAT v0.10.7
  [6405355b] Mosek v11.0.0
  [1ec41992] MosekTools v0.15.5 `https://github.com/jump-dev/MosekTools.jl.git#master`
  [8314cec4] PGFPlotsX v1.6.2
  [91a5bcdd] Plots v1.40.10
  [c36e90e8] PowerModels v0.21.3
  [017b0a0e] HSL_jll v2024.11.28+0 `../../../HSL_jll.jl.v2024.11.28`
  [656ef2d0] OpenBLAS32_jll v0.3.29+0
  [2f01184e] SparseArrays v1.11.0
1 Like

Great. Ill work on a new release in the next few days

1 Like

Will be fixed by New version: MosekTools v0.15.6 by JuliaRegistrator · Pull Request #127167 · JuliaRegistries/General · GitHub