Skip to main content

Error when importing gurobipy in a supercomputer

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Gwyneth Butera
    • Gurobi Staff

    Hi Carlos - 

    As far as I know, we've only seen this error once before. This error might be due to a Python version mismatch, or to a de-installation of pytracemalloc.

    • Do you get this error if you run a Python example from the Gurobi example directory?
    • Could you try re-installing gurobipy by going into GUROBI_HOME and running python3 setup.py install?
    • If this does not work, could you try re-installing pytracemalloc?

    Gwyneth

    0
  • Carlos Olivos
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Gwyneth, thanks for answering. 

    I ran it with python 3.8, and it worked. Nevertheless, I got this error. 

    Set parameter Username
    Set parameter TokenServer to value "hpcflexlm1"
    Traceback (most recent call last):
      File "tsp.py", line 17, in <module>
        mdl = Model('TSP')
      File "src/gurobipy/model.pxi", line 68, in gurobipy.Model.__init__
      File "src/gurobipy/gurobi.pxi", line 32, in gurobipy.gurobi._getdefaultenv
      File "src/gurobipy/env.pxi", line 62, in gurobipy.Env.__init__
    gurobipy.GurobiError: Failed to connect to token server 'hpcflexlm1' (port 41954) - license file '/opt/asn/apps/gurobi_9.5.1/gurobi.lic'.  Consult the Quick Start Guide for instructions on starting a token server.
     
    I asked the staff of the supercomputer, and they asked me to use python3.7. Nevertheless, when I do that, the error related to _Py_tracemalloc_config pop-up. 
     
    Which option do you think is easier for them to solve? Unfortunately, I do not have access to either install or re-install packages. 
     
    Thanks 
    0
  • Gwyneth Butera
    • Gurobi Staff

    Hi Carlos -  As this now appears to be a license issue, I have opened a new ticket. I will reply there. G.

    0

Post is closed for comments.