[Python] Getting OSError: [Errno 86] Bad CPU type in executable when using PuLP CBC solver

Discussão em 'Python' iniciado por Stack, Agosto 13, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to use the following Python package on M3 Max Mac: pydfs_lineup_optimizer.

    I am using Python 3.12.2.

    However, I am getting the following error:

    Traceback (most recent call last):
    File "/private/tmp/test.py", line 6, in <module>
    for lineup in optimizer.optimize(10):
    File "/private/tmp/venv/lib/python3.12/site-packages/pydfs_lineup_optimizer/lineup_optimizer.py", line 417, in optimize
    solved_variables = solver.solve()
    ^^^^^^^^^^^^^^
    File "/private/tmp/venv/lib/python3.12/site-packages/pydfs_lineup_optimizer/solvers/pulp_solver.py", line 47, in solve
    self.prob.solve(self.LP_SOLVER)
    File "/private/tmp/venv/lib/python3.12/site-packages/pulp/pulp.py", line 1737, in solve
    status = solver.actualSolve(self, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/tmp/venv/lib/python3.12/site-packages/pulp/apis/coin_api.py", line 101, in actualSolve
    return self.solve_CBC(lp, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/tmp/venv/lib/python3.12/site-packages/pulp/apis/coin_api.py", line 152, in solve_CBC
    cbc = subprocess.Popen(args, stdout = pipe, stderr = pipe, stdin=devnull)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    OSError: [Errno 86] Bad CPU type in executable: '/private/tmp/venv/lib/python3.12/site-packages/pulp/apis/../solverdir/cbc/osx/64/cbc'


    The same package works fine on M3 Pro.

    Does anyone know how I can resolve this error?

    Continue reading...

Compartilhe esta Página