Pulp testall error

1,722 views
Skip to first unread message

Jason Trager

unread,
Apr 4, 2012, 2:45:55 PM4/4/12
to pulp-or...@googlegroups.com
Hey All,

I've tried to get this to work right, but I cannot seem to manage it. 

When I install pulp and then run pulp.pulpTestAll, this is the result I get: 

pulp.pulpTestAll()
Solver pulp.solvers.PULP_CBC_CMD unavailable.
Solver pulp.solvers.CPLEX_DLL unavailable.
Solver pulp.solvers.CPLEX_CMD unavailable.
Solver pulp.solvers.CPLEX_PY unavailable.
Solver pulp.solvers.COIN_CMD unavailable.
Solver pulp.solvers.COINMP_DLL unavailable.
Solver pulp.solvers.GLPK_CMD unavailable.
Solver pulp.solvers.XPRESS unavailable.
Solver pulp.solvers.GUROBI unavailable.
 Testing zero subtraction
 Testing continuous LP solution
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/pulp.py", line 2227, in pulpTestAll
    pulpTestSolver(s)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/tests.py", line 539, in pulpTestSolver
    t(solver(msg=msg))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/tests.py", line 79, in pulpTest010
    pulpTestCheck(prob, solver, [LpStatusOptimal], {x:4, y:-1, z:6, w:0})
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/tests.py", line 14, in pulpTestCheck
    status = prob.solve(solver)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/pulp.py", line 1606, in solve
    status = solver.actualSolve(self, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PuLP-1.5.1-py2.7.egg/pulp/solvers.py", line 1821, in actualSolve
    raise PulpSolverError, "PuLP: Error while trying to execute "+self.path
pulp.solvers.PulpSolverError: PuLP: Error while trying to execute gurobi_cl

Please help me out with this error?

Fernando Badilla Veliz

unread,
Apr 5, 2012, 8:38:29 AM4/5/12
to pulp-or...@googlegroups.com
Not really sure, but looks like your command line gurobi is missing.
Can you execute it normally on a terminal?

fbv

--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pulp-or-discuss/-/jgZP8x-vPXIJ.
To post to this group, send email to pulp-or...@googlegroups.com.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.



--
cellphone 056 9 93099326
home 056 2 4942633
www.cec.uchile.cl/~fbadilla

Christophe-Marie Duquesne

unread,
Apr 5, 2012, 8:56:14 AM4/5/12
to pulp-or...@googlegroups.com
It is probably a license problem.

The test suite is designed not to run on command line solvers if they
can't be found in the path, so you should have gurobi_cl. You are
getting an error because gurobi_cl does not return 0.

As Fernando subjects, you should try to run gurobi_cl in a terminal
and see what happens.

Christophe-Marie Duquesne

unread,
Apr 5, 2012, 8:59:55 AM4/5/12
to pulp-or...@googlegroups.com
On Thu, Apr 5, 2012 at 2:56 PM, Christophe-Marie Duquesne
<chm.du...@gmail.com> wrote:
> As Fernando subjects,

s/subjects/suggests

Stuart Mitchell

unread,
Apr 6, 2012, 10:22:03 PM4/6/12
to pulp-or...@googlegroups.com
please post the output of gurobi_cl typed at the command prompt.

Have you installed gurobi? Do you have the license for using it setup correctly?

Stu

--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.
To post to this group, send email to pulp-or...@googlegroups.com.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.




--
Stuart Mitchell
PhD Engineering Science
Extraordinary Freelance Programmer and Optimisation Guru

Emily Frost

unread,
May 1, 2012, 2:14:44 PM5/1/12
to pulp-or-discuss
Hello all,

I am getting a similar error message, but mine appears when I try to
run a file like test1.py or WhiskasModel1.py, included in the examples
folder of PuLP 1.5.0. I have Gurobi installed on my computer (Mac OS
10.6) and have been using it successfully with the Python interface.
I would like to use PuLP as a more intuitive way of writing LPs/IPs.

When I tested my pulp installation, it returned Gurobi as available
with the warnings that Gurobi would not allow the problem to be
relaxed. I then tried calling WhiskasModel1.py and test1.py to
examine the behavior of pulp with Gurobi as the solver, and got the
following response:


cd PuLP-1.5.0/examples
python WhiskasModel1.py
Traceback (most recent call last):
File "WhiskasModel1.py", line 27, in <module>
prob.solve()
File "/Library/Python/2.6/site-packages/PuLP-1.5.0-py2.6.egg/pulp/
pulp.py", line 1594, in solve
status = solver.actualSolve(self, **kwargs)
AttributeError: 'NoneType' object has no attribute 'actualSolve'

I would greatly appreciate any fixes available.

Thanks,
Emily

Stuart Mitchell

unread,
May 1, 2012, 7:02:03 PM5/1/12
to pulp-or...@googlegroups.com
hmm can you try changing the line 27 in WhiskasModel1.py to

prob.solve(GUROBI())

and see if that works.

I think pulp does not cope well with not having the default solver as a fallback (I do not have a Mac OS version of cbc)

Stu

--
You received this message because you are subscribed to the Google Groups "pulp-or-discuss" group.
To post to this group, send email to pulp-or...@googlegroups.com.
To unsubscribe from this group, send email to pulp-or-discu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pulp-or-discuss?hl=en.

Emily Frost

unread,
May 2, 2012, 7:59:12 AM5/2/12
to pulp-or-discuss
Yes, if I explicitly assign Gurobi as the solver it works fine . . .
thanks, I will go ahead and do that for my models.

Emily
Reply all
Reply to author
Forward
0 new messages