{"id":28034,"library":"passagemath-lrslib","title":"passagemath-lrslib","description":"passagemath-lrslib provides a Python interface to lrslib for vertex enumeration and convex hull computation using the reverse search algorithm. Version 10.8.4 supports Python 3.11-3.14. Release cadence follows passagemath releases.","status":"active","version":"10.8.4","language":"python","source_language":"en","source_url":"https://github.com/passagemath/passagemath-lrslib","tags":["lrslib","vertex enumeration","convex hull","polyhedra","reverse search"],"install":[{"cmd":"pip install passagemath-lrslib","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core library providing sage-like environment","package":"passagemath","optional":false}],"imports":[{"note":"polyhedra is the main class; old Sage imports no longer work.","wrong":"from sage.geometry.polyhedron import Polyhedron","symbol":"polyhedra","correct":"from passagemath.lrslib import polyhedra"},{"note":"Direct use of Lrs class for lower-level control.","wrong":"","symbol":"Lrs","correct":"from passagemath.lrslib import Lrs"}],"quickstart":{"code":"from passagemath.lrslib import polyhedra\n\n# Define points (rows=points, columns=coordinates)\npoints = [[0, 0], [1, 0], [0, 1], [1, 1]]\n\n# Compute convex hull vertices\nvertices = polyhedra.convex_hull(points)\nprint(vertices)\n\n# Use environment variable for optional authentication if needed\nimport os\napi_key = os.environ.get('PASSAGEMATH_API_KEY', '')\n# Not used in this example; included as placeholder.","lang":"python","description":"Compute convex hull from a set of points and enumerate vertices."},"warnings":[{"fix":"Use `from passagemath.lrslib import polyhedra` instead.","message":"passagemath-lrslib is a replacement for SageMath's lrslib interface. Old imports like `from sage.geometry.polyhedron import Polyhedron` will not work.","severity":"breaking","affected_versions":">=10.0"},{"fix":"Ensure your input matrix has shape (n_points, n_dimensions).","message":"The `polyhedra` class expects points as a list of lists (rows=points, columns=coordinates). Transposing the matrix leads to incorrect results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install passagemath-lrslib` in your active Python environment (3.11-3.14).","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'passagemath.lrslib'"},{"fix":"Upgrade to latest version: `pip install --upgrade passagemath-lrslib`","cause":"Outdated version of passagemath-lrslib that doesn't export `polyhedra`.","error":"ImportError: cannot import name 'polyhedra' from 'passagemath.lrslib'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}