summarylogtreecommitdiffstats
path: root/sagemath-lrs.patch
blob: f0e5ea4eac8deb1dd991d102370445c1121b623a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py
index 2115de6800..da94aa5d45 100644
--- a/src/sage/game_theory/normal_form_game.py
+++ b/src/sage/game_theory/normal_form_game.py
@@ -621,6 +621,7 @@ from sage.matrix.constructor import vector
 from sage.misc.package import is_package_installed, PackageNotFoundError
 from sage.misc.temporary_file import tmp_filename
 from sage.numerical.mip import MixedIntegerLinearProgram
+import os
 
 try:
     from gambit import Game
@@ -1636,7 +1637,7 @@ class NormalFormGame(SageObject, MutableMapping):
         if not algorithm:
             if self.is_constant_sum():
                 algorithm = "lp"
-            elif is_package_installed('lrslib'):
+            elif os.path.exists('/usr/bin/lrsnash'):
                 algorithm = "lrs"
             else:
                 algorithm = "enumeration"