-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
Wrong folder for PULP_CBC_CMD on OSX arm64 #802
Comments
Hi I realised that this was a directory name issue. On my Mac the install was: However the code was trying to call So when I renamed the directory, I could run the solver. Looks like an installation / setup issue? |
Hi, I am having the same issue here: Macos 15.3.1 with python 3.13 and pulp freshly installed with pip: pulp does not find the solver but if I rename "...solverdir/cbc/osx/64/cbc" into "...solverdir/cbc/osx/arm64/cbc" then the code works. |
As I understand this is exactly the symmetric problem. Maybe we're detecting the architecture wrong. Lines 152 to 184 in 7c8aa93
In particular, this is how we find out the path to the binary: impor sys
import platform
is_64bits = sys.maxsize > 2**32
if is_64bits:
arch = "64"
if platform.machine().lower() in ["aarch64", "arm64"]:
arch = "arm64"
else:
arch = "32" In any case, you can always run the |
I think that it is the same problem: pulp looks for the cbc in the directory "arm64" but it was installed in the directory "64". Note that on my machine, your code sets the variable arch to 'arm64' (macbook pro M4). |
Having the same problem here. This is, running a "pip install pulp" installs CBC at But the code @pchtsp posted returns arch="arm64", making pulp look for CBC at import pulp
pulp.pulp_cbc_path
Indicating the correct path when setting the solver:
Does not solve the problem (it still looks for the default path with arm64):
|
Having the same problem with PuLP 3.0.2 (but not with 2.9.0) in a Mac M1 (15.1 (24B83)) with Python 3.10 (Python 3.10.15 (main, Jan 22 2025, 10:10:59) [Clang 16.0.0 (clang-1600.0.26.4)]). ❯ eza .venv/lib/python3.10/site-packages/pulp/solverdir/cbc/osx
64 So no |
Details for the issue
What did you do?
Run pulp with PULP_CBC_CMD
What did you expect to see?
Solver executing successfully
What did you see instead?
I got the following error:
"Traceback (most recent call last): File "/Users/ianlo/PycharmProjects/optimizer/main.py", line 100, in <module> prob.solve(pulp.PULP_CBC_CMD(msg=True, timeLimit=300, threads=6, gapRel=0.05)) File "/opt/homebrew/Caskroom/miniforge/base/envs/torch_py311/lib/python3.11/site-packages/pulp/pulp.py", line 1996, in solve status = solver.actualSolve(self, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Caskroom/miniforge/base/envs/torch_py311/lib/python3.11/site-packages/pulp/apis/coin_api.py", line 354, in actualSolve raise PulpSolverError( pulp.apis.core.PulpSolverError: PULP_CBC_CMD: Not Available (check permissions on /opt/homebrew/Caskroom/miniforge/base/envs/torch_py311/lib/python3.11/site-packages/pulp/solverdir/cbc/osx/arm64/cbc) "
Useful extra information
The info below often helps, please fill it out if you're able to. :)
What operating system are you using?
I'm using python version:
I installed PuLP via:
Did you also
The text was updated successfully, but these errors were encountered: