Using JuMP issue - ERROR: LoadError: syntax: malformed "import" statement

Hi All,

I have the following issue when I try to import JuMP (I use Julia 1.2)

julia> using JuMP
[ Info: Precompiling JuMP [4076af6c-e467-56ae-b986-b466b2749572]
ERROR: LoadError: syntax: malformed "import" statement
Stacktrace:
 [1] top-level scope at /Users/pavellebedev/.julia/packages/JuMP/PbnIJ/src/JuMP.jl:229
 [2] eval at ./boot.jl:330 [inlined]
 [3] eval(::Expr) at /Users/pavellebedev/.julia/packages/JuMP/PbnIJ/src/JuMP.jl:11
 [4] top-level scope at /Users/pavellebedev/.julia/packages/JuMP/PbnIJ/src/JuMP.jl:230
 [5] include at ./boot.jl:328 [inlined]
 [6] include_relative(::Module, ::String) at ./loading.jl:1094
 [7] include(::Module, ::String) at ./Base.jl:31
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:330 [inlined]
 [10] eval(::Expr) at ./client.jl:432
 [11] top-level scope at ./none:3
in expression starting at /Users/pavellebedev/.julia/packages/JuMP/PbnIJ/src/JuMP.jl:229
ERROR: Failed to precompile JuMP [4076af6c-e467-56ae-b986-b466b2749572] to /Users/pavellebedev/.julia/compiled/v1.2/JuMP/DmXqY.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [3] _require(::Base.PkgId) at ./loading.jl:1013
 [4] require(::Base.PkgId) at ./loading.jl:911
 [5] require(::Module, ::Symbol) at ./loading.jl:906

Looks like this was fixed in a recent update to JuMP: https://github.com/JuliaOpt/JuMP.jl/issues/1908 . You should be able to do:

pkg> up JuMP

(press ] to get the pkg> prompt).

1 Like