An error occurred when I `add JuMPeR`

I add JuMPeR after add JuMP, but it reported an error (P.S. JuMP is correctly installed):

(myenv) pkg> add JuMPeR
   Resolving package versions...
    Updating `D:\myenv\Project.toml`
  [707a9f91] + JuMPeR v0.6.0
    Updating `D:\myenv\Manifest.toml`
  [707a9f91] + JuMPeR v0.6.0
Precompiling project...
  ✗ JuMP
  ✗ JuMPeR
  0 dependencies successfully precompiled in 7 seconds. 40 already precompiled.
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

Then I run precompile and it returns:

(myenv) pkg> precompile
Precompiling project...
  ✗ JuMP
  ✗ JuMPeR
  0 dependencies successfully precompiled in 8 seconds. 40 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

JuMP [4076af6c-e467-56ae-b986-b466b2749572]

Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to "C:\\Users\\name\\.julia\\compiled\\v1.9\\JuMP\\jl_17BA.tmp".
ERROR: LoadError: UndefVarError: `Grisu` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base .\Base.jl:31
 [2] top-level scope
   @ C:\Users\name\.julia\packages\JuMP\I7whV\src\writers.jl:6
 [3] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [4] include(x::String)
   @ JuMP C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
 [5] top-level scope
   @ C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:947
 [6] include
   @ .\Base.jl:457 [inlined]
 [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) 
   @ Base .\loading.jl:2010
 [8] top-level scope
   @ stdin:2
in expression starting at C:\Users\name\.julia\packages\JuMP\I7whV\src\writers.jl:5
in expression starting at C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
in expression starting at stdin:2

JuMPeR [707a9f91-dad3-556f-9594-9b9a3b777385]

Failed to precompile JuMPeR [707a9f91-dad3-556f-9594-9b9a3b777385] to "C:\\Users\\name\\.julia\\compiled\\v1.9\\JuMPeR\\jl_2124.tmp".
ERROR: LoadError: UndefVarError: `Grisu` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base .\Base.jl:31
 [2] top-level scope
   @ C:\Users\name\.julia\packages\JuMP\I7whV\src\writers.jl:6
 [3] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [4] include(x::String)
   @ JuMP C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
 [5] top-level scope
   @ C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:947
 [6] include
   @ .\Base.jl:457 [inlined]
 [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)  
   @ Base .\loading.jl:2010
 [8] top-level scope
   @ stdin:2
in expression starting at C:\Users\name\.julia\packages\JuMP\I7whV\src\writers.jl:5
in expression starting at C:\Users\name\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to "C:\\Users\\name\\.julia\\compiled\\v1.9\\JuMP\\jl_2297.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2260
  [3] compilecache
    @ .\loading.jl:2127 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1770
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1625
  [6] macro expansion
    @ .\loading.jl:1613 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1576
  [9] include
    @ .\Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)    @ Base .\loading.jl:2010
 [11] top-level scope
    @ stdin:2
in expression starting at C:\Users\name\.julia\packages\JuMPeR\SzH48\src\JuMPeR.jl:17
in expression starting at stdin:2

The last release of JuMPer was over 5 years ago. It is unmaintained. To install, you will need Julia 1.0. It does not support Julia 1.9.

You’ll likely continue to run into other errors, so I would advice not using JuMPer unless absolutely necessary.

1 Like

Then is there any alternative Julia package for robust optimization?

Not to my knowledge. You’d need to manually implement the reformulations.

1 Like

OK, I see. Thanks a lot! :handshake: :handshake:

1 Like