Skip to content

Commit eb6a66f

Browse files
authored
Clarify how versions of Gurobi_jll are installed in README (#619)
1 parent 28325ac commit eb6a66f

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ Pkg.add("Gurobi")
7777

7878
In addition to installing the Gurobi.jl package, this will also download and
7979
install the Gurobi binaries from [Gurobi_jll.jl](https://github.com/jump-dev/Gurobi_jll.jl).
80-
You do not need to install Gurobi separately.
80+
**You do not need to install the Gurobi binaries separately.**
81+
82+
To install a particular version of Gurobi, install the corresponding version of
83+
[Gurobi_jll.jl](https://github.com/jump-dev/Gurobi_jll.jl). For example:
84+
```julia
85+
import Pkg; Pkg.pkg"add Gurobi_jll@11.0.3"
86+
```
8187

8288
### Manual installation
8389

@@ -106,6 +112,16 @@ To change the location of a manual install, change the value of `GUROBI_HOME`,
106112
re-run `Pkg.build("Gurobi")`, and then re-start Julia for the change to take
107113
effect.
108114

115+
### Gurobi Error 10009: Version number is XX.X, license is for version XX.X
116+
117+
This error occurs when Gurobi cannot find a valid license for the version that
118+
is running.
119+
120+
If you intended to manually install and use and older version of Gurobi, but it
121+
reports that the `Version number is` a newer version, this means that your
122+
manual installation did not work and we have automatically installed the latest
123+
default version. Double check the [Manual installation](@ref) instructions.
124+
109125
## Use with JuMP
110126

111127
To use Gurobi with JuMP, use `Gurobi.Optimizer`:
@@ -462,18 +478,5 @@ end
462478
You need to set the NonConvex parameter:
463479
```julia
464480
model = Model(Gurobi.Optimizer)
465-
set_optimizer_attribute(model, "NonConvex", 2)
466-
```
467-
468-
### Gurobi Error 1009: Version number is XX.X, license is for version XX.X
469-
470-
Make sure that your license is correct for your Gurobi version. See the
471-
[Gurobi documentation](https://support.gurobi.com/hc/en-us/articles/360034784572-How-do-I-check-for-a-valid-license-file-)
472-
for details.
473-
474-
Once you are sure that the license and Gurobi versions match, re-install
475-
Gurobi.jl by running:
476-
```julia
477-
import Pkg
478-
Pkg.build("Gurobi")
481+
set_attribute(model, "NonConvex", 2)
479482
```

0 commit comments

Comments
 (0)