Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use gurobi on Debian 9 (undefined symbol) #55

Open
jonglezb opened this issue Apr 18, 2019 · 0 comments
Open

Can't use gurobi on Debian 9 (undefined symbol) #55

jonglezb opened this issue Apr 18, 2019 · 0 comments

Comments

@jonglezb
Copy link

I installed Gurobi 5.6.3 as explained in the doc: extract it, then set GUROBI_HOME, then build/install Numberjack. I also had to set LD_LIBRARY_PATH at runtime so that the lib is found:

GUROBI_HOME="$HOME/tmp/gurobi/gurobi563/linux64"
LD_LIBRARY_PATH=$GUROBI_HOME/lib

However, when trying to solve a problem with Numberjack using Gurobi, I still get

ImportError: /usr/local/lib/python3.5/dist-packages/_Gurobi.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZNK12GRBException10getMessageB5cxx11Ev

Full error log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/Numberjack/solvers/Gurobi.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'Numberjack.solvers._Gurobi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/Numberjack/__init__.py", line 910, in load
    lib = __import__(solverstring, fromlist=[solverspkg])
  File "/usr/local/lib/python3.5/dist-packages/Numberjack/solvers/Gurobi.py", line 21, in <module>
    _Gurobi = swig_import_helper()
  File "/usr/local/lib/python3.5/dist-packages/Numberjack/solvers/Gurobi.py", line 20, in swig_import_helper
    return importlib.import_module('_Gurobi')
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /usr/local/lib/python3.5/dist-packages/_Gurobi.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZNK12GRBException10getMessageB5cxx11Ev

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "optimalsolver2.py", line 312, in <module>
    solve(param)
  File "optimalsolver2.py", line 281, in solve
    solver = model.load(param['solver'])
  File "/usr/local/lib/python3.5/dist-packages/Numberjack/__init__.py", line 915, in load
    solvername)
ImportError: ERROR: Failed during import, wrong module name? (Gurobi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant