Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The CBC binary artefact appears to be incompatible with Apple silicon and it's seemingly undocumented #866

@roganjoshp

Description

@roganjoshp

On a base install, from pulp.apis.listSolvers(onlyAvailable=True) you will get ['PULP_CBC_CMD']. If you try to run this on any simple example with problem.solve(pulp.PULP_CBC_CMD("problem_name")) you will get:

OSError: [Errno 86] Bad CPU type in executable: '/Users/my_name/.pyenv/versions/conway/lib/python3.13/site-packages/pulp/apis/../solverdir/cbc/osx/i64/cbc'

I spent hours trying to solve this. If you search for "python pulp OSError: [Errno 86] Bad CPU type in executable" you will find lots of open threads with suggestions ranging from "use Rosetta" to straight-up trampling the binary on an installation-by-installation basis.

To the best of my knowledge, this isn't documented anywhere. I answered the top search result on SO and the solution is remarkably simple.

If I am missing the reference in the documentation, please direct me to it so I can include it in my answer (and perhaps it needs to be more prominent). If it is missing from the documentation, I'm happy to put in a PR to provide a brief guide on the issue (but please tell me where you think it should live). Finally, I'm not sure if this constitutes a bug, given that the binary being distributed simply won't run on my M4 chip (and seemingly others) and this is unexpected behaviour, particularly for people unfamiliar with all the different solvers that are being wrapped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions