Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest Cbc build doesn't work with python-mip from pip

See original GitHub issue

Describe the bug

python-mip doesn’t come with aarch64 libs (eg for an M1 mac) (also see #199), so the only way to run it is by building cbc manually. Unfortunately, the documented way of doing that just grabs master, which currently fails the build, but Cbc@a1f4dd2dd02e5739b400de62a0c460b264311809 build successfully and can be used as a dylib. The main issue is it doesn’t work with the latest pip version of python-mip (and, as far as I can tell, won’t work with master either):

Welcome to the CBC MILP Solver 
Version: devel 
Build Date: Jan 12 2022
Starting solution of the Linear programming relaxation problem using Primal Simplex

Coin0506I Presolve 58925 (-8413) rows, 52054 (-98143) columns and 207325 (-34239) elements
Clp0030I 11 infeas 23.346334, obj 9337.4902 - mu 0.020680678, its 105, 39503 interior
Clp0030I 22 infeas 2.0744055, obj 9410.1855 - mu 0.00025521491, its 105, 41072 interior
Clp0030I 33 infeas 0.045116952, obj 9410.9402 - mu 9.4495685e-06, its 105, 42120 interior
Clp0030I 45 infeas 0.00054603362, obj 9410.9704 - mu 1.1661468e-07, its 105, 42140 interior
Clp1000I sum of infeasibilities 3.75798e-05 - average 6.37757e-10, 9915 fixed columns
Coin0506I Presolve 18479 (-40446) rows, 20478 (-31576) columns and 59541 (-147784) elements
Clp0006I 0  Obj 9410.9708 Dual inf 2141846.9 (20478)
Clp0029I End of values pass after 20478 iterations
Clp0014I Perturbing problem by 0.001% of 1.3997147 - largest nonzero change 2.9996244e-05 ( 0.0026276029%) - largest zero change 2.9984169e-05
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Coin0511I After Postsolve, objective 9794.4, infeasibilities - dual 0 (0), primal 0 (0)
Clp0006I 0  Obj 9794.4
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Clp0000I Optimal - objective value 9794.4
Coin0511I After Postsolve, objective 9794.4, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 9794.4 - 0 iterations time 3.662, Presolve 0.11, Idiot 3.53

Starting MIP optimization
Unrecognized parameter - maxSavedSolutions=10, exiting...
Total time (CPU seconds):       3e-05   (Wallclock seconds):       0.000328064
no feasible solution found, lower bound is: -1.7976931348623157e+308

This line tries to set maxSavedSolutions, which seems to not be recognised by the latest version of cbc.

The problem is solved to completion if I comment that line out manually.

To Reproduce

I believe the description above should qualify.

Expected behavior

I’d expect it to not fail with an error. It would be perfect to have macos aarch64 builds in the wheel, but I understand that’s a bit complex. A possible alternative solution would be explicitly pinning the version of cbc that python-mip definitely works with.

Desktop (please complete the following information):

  • Operating System, version: macOS Monterey 12.1
  • Python version: 3.9.9
  • Python-MIP version (we recommend you to test with the latest version): 1.13.0

Additional context


Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

tkralphscommented, Sep 10, 2022

This should be easy to fix. Rather than workarounds, why don’t we just fix the problem so we can move further towards getting Cbc master out into release? If someone on the python-mip side could be precise about what is going wrong and perhaps identify a fix, I will do whatever is required on the Cbc side.

h-g-scommented, Sep 10, 2022

Hi, we’re having some problems in using recent master after the refactor branch was incorporated into Cbc. While this problems aren’t solved the latest Cbc commit which would probably be compatible would be this:

Read more comments on GitHub >

github_iconTop Results From Across the Web

'pip' is not recognized as an internal or external command
C:\Python34> pip install Django 'pip' is not recognized as an internal or external command, operable program or batch file.
Read more >
cbc-binary-toolkit - PyPI
The VMware Carbon Black Cloud Binary Toolkit provides useful tools to process binaries and upload IOCs to your Feeds.
Read more >
Hands-On Linear Programming: Optimization With Python
In this tutorial, you'll learn about implementing optimization in Python with linear programming libraries. Linear programming is one of the fundamental ...
Read more >
How to debug most errors during solving — PuLP 2.7.0 ...
Jupyter notebooks / anaconda / conda issues . There have been several issues of the default solver (CBC) not working with an...
Read more >
Oemof install issues - WinPython - Q&A
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found