spopt: pulp.apis.core.PulpSolverError: Pulp: cannot execute cbc.exe
Hello,
I am trying to execute the following:
solver = pulp.COIN_CMD(msg=True, warmStart=True)
pcenter_from_cm = PCenter.from_cost_matrix(
distances, p_facilities=facilities, name="p-center-network-distance"
)
pcenter_from_cm = pcenter_from_cm.solve(solver)
But get the following error:
pcenter_from_cm = pcenter_from_cm.solve(solver)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spopt\locate\p_center.py", line 409, in solve
self.problem.solve(solver)
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\pulp\pulp.py", line 1913, in solve
status = solver.actualSolve(self, **kwargs)
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\pulp\apis\coin_api.py", line 137, in actualSolve
return self.solve_CBC(lp, **kwargs)
File "C:\Users\x\Documents\spopt_venv\lib\site-packages\pulp\apis\coin_api.py", line 146, in solve_CBC
raise PulpSolverError(
pulp.apis.core.PulpSolverError: Pulp: cannot execute cbc.exe cwd: C:\Users\x\Documents\
Does anybody have any suggestions?
I have tried passing the msg=1 argument to the solver, to get more information.
I have checked the precision of the numbers, rounding them.
The cost distance matrix is is a pairwise distance matrix of one df of points - i.e. with itself. Could it be that it is due to duplicated variables / constraints?
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (7 by maintainers)
Hey there! Installing
pulpviapip/condadoes not installCOIN_CMD. To use this solver, you should haveCBCinstalled in your environment. See the instruction here.If this error persists, please let us know.
By the way, the
pip install pulpinstalls automaticallyPULP_CBC_CMDso you can use that insteadCOIN_CMD.