How to update JuMP?

I am using JuMP v"0.18.5+". But in this version,
const MOI = JuMP.MathOptInterface

UndefVarError: MathOptInterface not defined

 [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
 [2] top-level scope at In[80]:1

I have gone through the git repo of JuMP and got to know that it is available in v0.19.0.
So I have tried to update the package by,

julia> Pkg.update("JuMP")
  Updating registry at `~/.julia/registries/General`
  Updating git-repo ``
  Updating git-repo ``
 Resolving package versions...
  Updating `~/.julia/environments/v1.0/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.0/Manifest.toml`

but still it is not getting updated.

 "JuMP"    => v"0.18.5+"

Please Help!
Thanks in advance!

I think that these are just beta releases of JuMP v0.19 in GitHub, but a new version has not been tagged at METADATA.jl yet, so the package manager does not know about it.

If you want to work with the cutting edge in JuMP, you could try Pkg.develop("JuMP") which will check out the master branch by default. You can then change the branch/tag later, if needed.

Maybe it also helps to just Pkg.add("MathOptInterface"), but that should be handled automatically, as a dependency (for JuMP). Of course, if you want to use MOI in your own code, you have to add it explicitly.

1 Like

You can find installation instructions here:

tl;dr: To get the latest beta, run

] free JuMP
] add JuMP#v0.19-beta2

To get the bleeding-edge

] free JuMP
] add JuMP#master

Thanks a lot!