Thanks to visit codestin.com
Credit goes to github.com

Skip to content

more issues with binder for locate notebooks #290

@jGaboardi

Description

@jGaboardi

xref #276

There appears to be more issues with binder.

  • pulp installation. For example, see the error below from cell 19 in p-median.ipynb.
    • PulpSolverError Traceback
      ---------------------------------------------------------------------------
      PulpSolverError                           Traceback (most recent call last)
      Cell In [19], line 1
      ----> 1 pmedian_from_cm = pmedian_from_cm.solve(solver)
            2 pmedian_from_cm
      
      File /srv/conda/envs/notebook/lib/python3.10/site-packages/spopt/locate/p_median.py:347, in PMedian.solve(self, solver, results)
          331 def solve(self, solver: pulp.LpSolver, results: bool = True):
          332     """
          333     Solve the PMedian model
          334 
         (...)
          345     PMedian object
          346     """
      --> 347     self.problem.solve(solver)
          348     self.check_status()
          350     if results:
      
      File /srv/conda/envs/notebook/lib/python3.10/site-packages/pulp/pulp.py:1913, in LpProblem.solve(self, solver, **kwargs)
         1911 # time it
         1912 self.startClock()
      -> 1913 status = solver.actualSolve(self, **kwargs)
         1914 self.stopClock()
         1915 self.restoreObjective(wasNone, dummyVar)
      
      File /srv/conda/envs/notebook/lib/python3.10/site-packages/pulp/apis/coin_api.py:356, in PULP_CBC_CMD.actualSolve(self, lp, callback)
          354 def actualSolve(self, lp, callback=None):
          355     """Solve a well formulated lp problem"""
      --> 356     raise PulpSolverError(
          357         "PULP_CBC_CMD: Not Available (check permissions on %s)"
          358         % self.pulp_cbc_path
          359     )
      
      PulpSolverError: PULP_CBC_CMD: Not Available (check permissions on /srv/conda/envs/notebook/lib/python3.10/site-packages/pulp/apis/../solverdir/cbc/linux/64/cbc)
      
      Screenshot 2022-10-29 at 12 40 36 PM
    • Seems that only ['GLPK_CMD', 'COIN_CMD'] solvers are installing from the env, so I'll update the solvers to either one of those in the notebooks.

  • routingpy installation. Seem to be trouble getting routingpy installed via environment.yml even though it is listed in there.
    • ModuleNotFoundError Traceback
      ---------------------------------------------------------------------------
      ModuleNotFoundError                       Traceback (most recent call last)
      Cell In [2], line 6
            4 import numpy
            5 import pulp
      ----> 6 import routingpy
            7 from routingpy import OSRM
            8 import shapely
      
      ModuleNotFoundError: No module named 'routingpy'
      
      Screenshot 2022-10-29 at 12 41 21 PM
    • Solution
      try:
          import routingpy
      except ModuleNotFoundError:
          print("`routingpy ` not found. Downloading now...")
          !pip install routingpy

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions