python-mip icon indicating copy to clipboard operation
python-mip copied to clipboard

Issue Using Highs-Solver on Windows

Open jerak opened this issue 1 year ago • 5 comments

Description I am trying to use the HiGHS-solver as an alternative to the CBC-solver that I previously used. I am using a Windows machine, using Python 3.9. To achieve this, I have done the following:

  • Installed the latest version on master, i.e., the version that contains this fix: #377
  • Installed highspy 1.9.0
  • Installed cffi 1.17.0

In highs.py file, the binary file (_core.cp39-win_amd64.pyd) can be found, and therefore has_highs is set to True. However, further down in the code, I get the following error:

AttributeError: function/symbol 'Highs_destroy' not found in library 
'~\venv\lib\site-packages\highspy\_core.cp39-win_amd64.pyd': error 0x7f

Operating System Information

  • Operating System, version: Windows 11
  • Python version: 3.9
  • Python-MIP version (we recommend you to test with the latest version): latest master-version

Question Did anyone using the HiGHS-solver already encounter this error before? Does anyone have suggestions on the steps to take?

Update I also tried using different a different version of highspy: 1.7.1.dev1, but no luck.

jerak avatar Jan 06 '25 14:01 jerak

@rschwarz , I now see you encountered the same issue, as you mention in this thread.

Did you manage to resolve this somehow on your Windows machine?

jerak avatar Jan 06 '25 15:01 jerak

No, I have not followed up on using HiGHS on Windows. I thought that later versions of highspy had resolved all of these issues.

rschwarz avatar Jan 06 '25 18:01 rschwarz

To add to this: I can not reproduce the issue on Linux (Ubuntu 24.04) with highspy 1.9.0 and mip on master.

rschwarz avatar Jan 14 '25 15:01 rschwarz

We can reproduce this on Windows, still.

See also the upstream issue on the HiGHS repo: https://github.com/ERGO-Code/HiGHS/issues/2106

I think this could be resolved by not using the shared library from highspy on Windows, but instead use the proper libhighs.dll, as provided by HiGHS_jll, for example.

rschwarz avatar Mar 26 '25 10:03 rschwarz

Is likely fixed by #418

rschwarz avatar Sep 18 '25 09:09 rschwarz