Error when importing gurobipy in a supercomputer
回答済みHello,
I am trying to use gurobi in a supercomputer and when I import the gurobipy library I got this error. I could not find something similar.
See the error below
Traceback (most recent call last):
File "tsp.py", line 1, in <module>
import gurobipy as gp
File "/opt/asn/apps/gurobi_9.5.1/gurobi951/linux64/lib/python3.8_utf32/gurobipy/__init__.py", line 1, in <module>
from .gurobipy import *
ImportError: /opt/asn/apps/gurobi_9.5.1/gurobi951/linux64/lib/python3.8_utf32/gurobipy/gurobipy.so: undefined symbol: _Py_tracemalloc_config
-
正式なコメント
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. -
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
gurobipyby going into GUROBI_HOME and runningpython3 setup.py install? - If this does not work, could you try re-installing pytracemalloc?
Gwyneth
0 -
Hi Gwyneth, thanks for answering.
I ran it with python 3.8, and it worked. Nevertheless, I got this error.
Set parameter UsernameSet 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._getdefaultenvFile "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.Thanks0 -
Hi Carlos - As this now appears to be a license issue, I have opened a new ticket. I will reply there. G.
0
投稿コメントは受け付けていません。
コメント
4件のコメント