{"id":26874,"library":"cypari","title":"cypari","description":"A standalone Python interface to the PARI/GP computer algebra system, extracted from SageMath. Version 2.5.6 (2024?) provides basic number theory functions, elliptic curves, and polynomial arithmetic. Development appears slow; latest release is from 2020?.","status":"maintenance","version":"2.5.6","language":"python","source_language":"en","source_url":"https://github.com/defeo/cypari2","tags":["computer-algebra","number-theory","pari-gp"],"install":[{"cmd":"pip install cypari","lang":"bash","label":"Standard PyPI install"}],"dependencies":[],"imports":[{"note":"Package name is cypari, but top-level module is cypari2. Use cyipopt pattern?","wrong":"import cypari","symbol":"cypari2","correct":"import cypari2"},{"note":"Direct import from cypari fails; must use cypari2.","wrong":"from cypari import Pari","symbol":"Pari","correct":"from cypari2 import Pari"}],"quickstart":{"code":"from cypari2 import Pari\npari = Pari()\nprint(pari('factor(123456789)'))","lang":"python","description":"Initialize a PARI session and compute factorization."},"warnings":[{"fix":"Use `import cypari2` instead of `import cypari`.","message":"The import module is `cypari2`, not `cypari`. Even though the PyPI package is `cypari`, all imports use the `cypari2` namespace.","severity":"gotcha","affected_versions":"all"},{"fix":"Update to `from cypari2 import Pari`.","message":"Older versions (pre-2.0) used `from cypari import Pari` directly. This no longer works.","severity":"deprecated","affected_versions":"<2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import cypari2` instead of `import cypari`.","cause":"Trying to import 'cypari' but the actual module is 'cypari2'.","error":"ModuleNotFoundError: No module named 'cypari'"},{"fix":"Use `from cypari2 import Pari`.","cause":"After successful import of 'cypari' (if eventually loaded), the symbol is not there.","error":"ImportError: cannot import name 'Pari' from 'cypari'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}