PulpSolverError: Not Available check permissions

966 Views Asked by At

I run the 'PuLP' solver on my OSx and after some conda updates it stopped recognizing the solver.

I call:

solver = pulp.get_solver('PULP_CBC_CMD')
prob.solve(solver)

I get:

pulp.apis.core.PulpSolverError: PULP_CBC_CMD: Not Available (check permissions on /opt/anaconda3/envs/my_env/lib/python3.8/site-packages/pulp/apis/../solverdir/cbc/osx/64/cbc)

When I asked for a path I got:

pl.pulp_cbc_path
Out[9]: '/opt/anaconda3/envs/ExMAS/lib/python3.8/site-packages/pulp/apis/../solverdir/cbc/osx/64/cbc

Maybe interestingly, my conda env is for python 3.9 and my PuLP is in3.8 folder

My PuLP is 2.6.0

Thanks

2

There are 2 best solutions below

0
On BEST ANSWER

Ok, seems fixed.

when I unistalled pulp- both from conda and pip (I think by default my conda pulp was used) and then installed them again (only with pip now)

it seems to be solved. maybe this was issue with conda installation and pip installation was fine...?

0
On

I installed pulp with conda install -c conda-forge pulp on macOS, had the same error

pulp.apis.core.PulpSolverError: PULP_CBC_CMD: Not Available (check permissions on...

I could not uninstall pulp

conda remove pulp
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - python=3.1

So I just created a new env and installed pulp with pip

conda create --name myNewEnv --clone base
conda activate myNewEnv
conda install pandas
pip install pulp

It ran in this case. There are some threads about pulp installed not with pip having problems with permissions, etc...