# ERROR: MethodError: no method matching Model

**URL:** <https://discourse.julialang.org/t/error-methoderror-no-method-matching-model/45699>\
**Category:** Optimization (Mathematical)\
**Created:** [August 28, 2020, 3:37pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-model/45699 "2020-08-28T15:37:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cotepascal76](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cotepascal76](https://discourse.julialang.org/u/cotepascal76)\
**Post date:** [August 28, 2020, 3:37pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-model/45699/1 "2020-08-28T15:37:24Z")

</div>

Hello, I’m new in Julia and JuMP and I just tried to install and test JuMP but I got this error (with all solvers that I tested):

julia\> Model(Gurobi.Optimizer)  
ERROR: MethodError: no method matching Model(::Type{Gurobi.Optimizer})  
Closest candidates are:  
Model(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at …

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [August 28, 2020, 5:31pm UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-model/45699/2 "2020-08-28T17:31:02Z")

</div>

Hi cotepascal76, welcome to our community.

I would guess that either:

1. `Model` was not imported (by `using JuMP` or `import JuMP: Model`); but probably this is not the problem.
2. You are using an older version of `JuMP`. You can check which version you are using by: `import Pkg; Pkg.status()`.

---

<div class="post-metadata">

**Author:** ![cotepascal76](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cotepascal76](https://discourse.julialang.org/u/cotepascal76)\
**Post date:** [August 29, 2020, 10:34am UTC](https://discourse.julialang.org/t/error-methoderror-no-method-matching-model/45699/3 "2020-08-29T10:34:26Z")

</div>

Thanks for your reply.  
I update jump To 0.21 and it works now.

Pascal
