2

I'm getting this error when I'm trying to plot linear programming equations on Jupyter Notebook using Pulp.

AttributeError: 'NoneType' object has no attribute 'actualSolve'

Context: img

3
  • Welcome to SO. Please provide detailed information about your problem, a minimal-reproducible-example and what you did try before posting. Also, it is not a good idea to insert images to display text. Please, check how-to-ask a question for more details as well. Commented Jul 9, 2020 at 23:07
  • I have never been using this library but have you defined the default solver ? From the docs I see that, you need to setup the solvers, or pass it as argument to the solve coin-or.github.io/pulp/guides/how_to_configure_solvers.html Commented Jul 9, 2020 at 23:07
  • or just call prob.setSolver() before calling prob.solve() it will set default solver.` Commented Jul 9, 2020 at 23:12

1 Answer 1

0

For some reason, installing Pulp using easy_install did not install default solver. I had to uninstall Pulp using pip uninstall pulp and then reinstalled using pip install pulp.
Use the following to see if it installed any solver.

import pulp as pl
solver_list = pl.listSolvers(onlyAvailable=True)
Sign up to request clarification or add additional context in comments.

Comments