JuMP installation error

I use Julia 1.0 and when I get an error when I try to install JuMP

julia> Pkg.add("JuMP")
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [4076af6c] + JuMP v0.18.2
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [4076af6c] + JuMP v0.18.2
  [89212889] + ReverseDiffSparse v0.8.2

julia> Pkg.build("JuMP")
  Building SpecialFunctions → `~/.julia/packages/SpecialFunctions/KvXoO/deps/build.log`

julia> using JuMP
[ Info: Precompiling JuMP [4076af6c-e467-56ae-b986-b466b2749572]
ERROR: LoadError: LoadError: syntax: invalid "::" syntax
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1041
 [3] include at ./sysimg.jl:29 [inlined]
 [4] include(::String) at /home/sriram/.julia/packages/JuMP/6aWuF/src/JuMP.jl:13
 [5] top-level scope at none:0
 [6] include at ./boot.jl:317 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1041
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:319 [inlined]
 [11] eval(::Expr) at ./client.jl:389
 [12] top-level scope at ./none:3
in expression starting at /home/sriram/.julia/packages/JuMP/6aWuF/src/JuMPContainer.jl:18
in expression starting at /home/sriram/.julia/packages/JuMP/6aWuF/src/JuMP.jl:55
ERROR: Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to /home/sriram/.julia/compiled/v1.1/JuMP/DmXqY.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
 [4] macro expansion at ./logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at ./loading.jl:944
 [6] require(::Base.PkgId) at ./loading.jl:855
 [7] macro expansion at ./logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at ./loading.jl:837

Any reason why I get this error? How can I resolve this?

Please see the JuMP readme regarding support for Julia v1.0.

The latest release of JuMP (based on MathProgBase) is not compatible with Julia 0.7 or 1.0. We encourage users to continue to use Julia 0.6 for a stable environment. The development version of JuMP (based on MOI) supports both Julia 0.6 and Julia 0.7 but is alpha-quality with breaking changes in still progress. See the Discourse post for more information on Julia 0.7/1.0 support.

You can use the release-0.18 branch of JuMP. For the most part it should work fine on 1.0. At some point that will get tagged as 0.18.3, but until then, the same warning applies as for JuMP 0.19: it’s in development.

(Perhaps not great of me to advertise that before it’a tagged, but I’d hate to see lots of people getting stuck on 0.6. The community has put a huge amount of effort into getting everything updated, and many of us are no longer considering 0.6 compatibility.)

Should the current release have an upper bound on the Julia version?

Ideally, but to do so they would need to tag a release that only changes the REQUIRE file and we are hopefully really close to having a real, 1.0-compatible release so it really doesn’t seem worth it.

Thank you all for the help and comments.

I finally went with using the release-0.18 branch of JuMP.

Thanks

Sriram

1 Like