Skip to main content

License problem

Answered

Comments

6 comments

  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Fatemeh,

    Please check whether your GRB_LICENSE_FILE environment variable is set correctly and points to the actual location of the license file. You can also copy the license file to C:\gurobi\gurobi.lic.

    Cheers,
    Matthias

    0
  • Fatemeh Kafash Ranjbar
    Gurobi-versary
    First Comment
    First Question

    Hi Matties,

    I have to uninstall anaconda and gurobi and install all again an follow all procedures, but the problem is it still hints to the previous directory and version of the gurobi that at this moment is not on the computer.

    I tried to change directory but still doesn't work. my OS is windows 64.

    0
  • Fatemeh Kafash Ranjbar
    Gurobi-versary
    First Comment
    First Question

    I only want to tell that I fix the problem, I share my mistake with others. maybe it can help.

    2
  • Kristin Carr
    Gurobi-versary
    First Comment

    I received an academic license today and tried to run my model using gurobi. I get this error: 

    ERROR: Solver (gurobi) returned non-zero return code (1)
    ERROR: Solver log: Using license file C:\Users\kaise Traceback (most recent
    call last):
    File "<stdin>", line 5, in <module> File
    "C:\Users\kaise\anaconda3\lib\site-
    packages\pyomo\solvers\plugins\solvers\GUROBI_RUN.py", line 61, in
    gurobi_run
    model = read(model_file)
    File "gurobi.pxi", line 3198, in gurobipy.read File "gurobi.pxi", line
    80, in gurobipy.gurobi.read File "gurobi.pxi", line 32, in
    gurobipy.gurobi._getdefaultenv File "env.pxi", line 67, in
    gurobipy.Env.__init__
    gurobipy.GurobiError: Unable to open Gurobi license file 'C:\Users\kaise'

    I used this code to check for the license:

    gurobi_cl --license

    And received the following error:

    Using license file C:\Users\kaise
    Set parameter LogFile to value gurobi.log

    Failed to set up a license

    ERROR 10009: Unable to open Gurobi license file 'C:\Users\kaise'

    This is the default location and has been set as a system variable.

    Any help would be much appreciated!

     

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    If your license file is saved as \(\texttt{C:\Users\kaise\gurobi.lic}\), you shouldn't need to set the \(\texttt{GRB_LICENSE_FILE}\) system environment variable. If you do set \(\texttt{GRB_LICENSE_FILE}\), it should be set to the full path of the license file, including the filename. E.g., setting the environment variable \(\texttt{GRB_LICENSE_FILE}\) to \(\texttt{C:\Users\kaise\gurobi.lic}\) should work, but \(\texttt{C:\Users\kaise}\) may not.

    1
  • Kristin Carr
    Gurobi-versary
    First Comment

    Once I restarted anaconda, this fix worked!

    Thank you so much!

    0

Please sign in to leave a comment.