Skip to content

Check the presence of lrsnash for obtain_nash() #34717

@kwankyu

Description

@kwankyu

To fix failures like

File "src/sage/game_theory/catalog_normal_form_games.py", line 916, in sage.game_theory.catalog_normal_form_games.TravellersDilemma
Failed example:
    g.obtain_nash()
Exception raised:
    Traceback (most recent call last):
      File "/Users/kwankyu/GitHub/sage-dev/src/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/kwankyu/GitHub/sage-dev/src/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.game_theory.catalog_normal_form_games.TravellersDilemma[8]>", line 1, in <module>
        g.obtain_nash()
      File "/Users/kwankyu/GitHub/sage-dev/src/sage/game_theory/normal_form_game.py", line 1688, in obtain_nash
        return self._solve_lrs(maximization)
      File "/Users/kwankyu/GitHub/sage-dev/src/sage/game_theory/normal_form_game.py", line 1758, in _solve_lrs
        LrsNash().require()
      File "/Users/kwankyu/GitHub/sage-dev/src/sage/features/__init__.py", line 209, in require
        raise FeatureNotPresentError(self, presence.reason, presence.resolution)
    sage.features.FeatureNotPresentError: lrsnash is not available.
    Executable 'lrsnash' not found on PATH.
    No equivalent system packages for homebrew are known to Sage.
    To install lrsnash using the Sage package manager, you can try to run:
      !sage -i lrslib
    No equivalent system packages for pip are known to Sage.
    Further installation instructions might be available at http://cgm.cs.mcgill.ca/~avis/C/lrs.html.

I have been seeing these failures for a long time on my system (mac os).

Component: game theory

Author: Matthias Koeppe

Branch/Commit: 4a11843

Reviewer: Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/34717

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions