PuLP in Python Repl with error in solve()

Question:
I am trying to solve a very simple Linear Programming problem by using the PuLP library. I’ve done this process before but just recently I have had this problem. To start, I create a Repl using a Python template, import the PuLP package and, after defining the problem correctly, when I run the solver (CBC - the solver by default) I get a very strange error on the “.solve()” argument.

I don’t think the problem is in the code because when I run this exact same PuLP code in an older Python Repl it works well. I think the current Repl is using Python 3.8 and PuLP 2.6 while the old Repl is using PuLP 1.6.10 (I’m not sure of the Python version and I’m not sure how to check it). The packager files (poetry.lock and pyproject.toml) in the old and new Repls are different.

The full code is:

import pulp

x=pulp.LpVariable.dicts('x',range(2),cat=pulp.LpContinuous)

model=pulp.LpProblem('test',pulp.LpMaximize)

model += 4*x[0]+3*x[1]

model += 2*x[0]+x[1]<=10
model += 3*x[0]-2*x[1]<=20

status=model.solve()

The error I get is:

Traceback (most recent call last): File “main.py”, line 12, in status=model.solve() File “/(…)/lib/python3.8/site-packages/pulp/pulp.py”, line 1913, in solve status=solver.actualSolve(self,**kwargs) File “/(…)/lib/python3.8/site-packages/pulp/apis/coin_api.py”, line 137, in actualSolve return self.solve_CBC(lp,**kwargs) File “/(…)/lib/python3.8/site-packages/pulp/apis/coin_api.py”, line 198, in solve_CBC raise PulpSolverError(pulp.apis.core.PulpSolverError: Pulp: Error while trying to execute, use msg=True for more details (…)

Note: I’ve tried to add msg=True but not more information was produced in the log

I’ve also tried using the older version of PuLP in the new project, but there is an error importing PuLP with that version.

Do you know if there is a way to change the Repl project definitions to be able to use PuLP in the current Python template from Replit? As is, it seems that PuLP is now not functional in Python Repls…

Repl link:
https://replit.com/@mboliveira/HopefulSpiritedHarddrives


x=pulp.LpVariable.dicts('x',range(2),cat=pulp.LpContinuous)

model=pulp.LpProblem('test',pulp.LpMaximize)

model += 4*x[0]+3*x[1]

model += 2*x[0]+x[1]<=10
model += 3*x[0]-2*x[1]<=20

status=model.solve()