2
votes

i'm using version 1.4.1 in Julia and wanted to create an optimization model. This is what i did:

using JuMP
using Cbc 

model = Model()
set_optimizer(model, Cbc.Optimizer)

And i get this error: "UndefVarError: set_optimizer not defined in top-level scope at.." So i tried:

using JuMP
using Cbc 
model = Model(Cbc.Optimizer)

and i get this error: "MethodError: no method matching Model(::Type{Cbc.Optimizer}) (...) .juliapro\JuliaPro_v1.4.1-1\packages\JuMP\I7whV\src\JuMP.jl:168"

I updated and precompiled all the packages, and still nothing. Do you have any idea of what could it be?

1

1 Answers

3
votes

Don't use JuliaPro. It is out-dated, doesn't have the latest versions of widely used packages, and causes a lot of problems. Its intended purpose is for companies to install a selected subset of packages. Not as a "pro" version for most users.

Download and install regular Julia from here: https://julialang.org/downloads/

(Your problem is that JuliaPro v1.4.1 ships an old version of JuMP. You could work around this by changing the registry, but it's much easier to just install regular Julia.)