Getting "MethodError: no method matching Model()" when initializing models on JuMP

I had a similar issue

 add JuMP@0.21
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.5] or uninstalled
 ├─restricted to versions 0.21 by an explicit requirement, leaving only versions 0.21.0-0.21.5
 └─restricted by compatibility requirements with ConditionalJuMP [ae04f764] to versions: 0.18.3-0.18.6 — no versions left
   └─ConditionalJuMP [ae04f764] log:
     ├─possible versions are: 0.1.0 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0

I solved this by ] rm ConditionalJuMP and then add JuMP@0.21.0

I hope this be useful

2 Likes