{"id":24621,"library":"spherogram","title":"Spherogram","description":"A Python library for spherical diagrams in 3-manifold topology, including links, knots, braids, tangles, and planar diagrams. Current version 2.4.1 supports ribbon concordance tools, bridge number bounds, and knot Floer homology. Release cadence is irregular, with major features in even-numbered versions.","status":"active","version":"2.4.1","language":"python","source_language":"en","source_url":"https://github.com/3-manifolds/Spherogram","tags":["knot-theory","3-manifolds","topology","spherical-diagrams","braid","tangle","jones-polynomial","link"],"install":[{"cmd":"pip install spherogram","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for snapPy integration and auto-import of snappy_16_knots","package":"snappy","optional":false}],"imports":[{"note":"Top-level import is correct; submodule imports may break","wrong":"from spherogram.links import Link","symbol":"Link","correct":"from spherogram import Link"},{"note":"","wrong":"","symbol":"Knot","correct":"from spherogram import Knot"},{"note":"Submodule path may not be stable","wrong":"from spherogram.tangles import Tangle","symbol":"Tangle","correct":"from spherogram import Tangle"}],"quickstart":{"code":"from spherogram import Link\nL = Link('K11n34')\nprint(L.bridge_number())\nprint(L.jones_polynomial())","lang":"python","description":"Creates a link from a named knot (e.g. 'K11n34') and computes its bridge number and Jones polynomial."},"warnings":[{"fix":"Update any code relying on signature signs or braid generator orientation.","message":"Version 2.0 changed the sign convention for knot signature (positive knots now have negative signature) and braid generator signs (positive generators give positive crossings). Older code expecting old signs will produce wrong results.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Do not assume crossing indices or ordering remain constant after simplify().","message":"The function `Link.simplify()` was significantly improved in 2.1 but may change the diagram representation; do not depend on stable crossing order after simplification.","severity":"breaking","affected_versions":">=2.1"},{"fix":"Use `from snappy_16_knots import ...` explicitly.","message":"Automatic import of `snappy_16_knots` in 2.4.1 may be removed in future; always import explicitly if needed.","severity":"deprecated","affected_versions":"2.4.1+"},{"fix":"After constructing a Link, call L.simplify() for a reduced diagram.","message":"Many functions return `Link` objects that may have duplicate crossings or be non-minimal; always call `simplify()` before computing invariants if diagram size matters.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install spherogram` in the target Python environment.","cause":"spherogram not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'spherogram'"},{"fix":"Change to `from spherogram import Link`.","cause":"Using incorrect submodule import path. The correct symbol is at top level.","error":"ImportError: cannot import name 'Link' from 'spherogram.links'"},{"fix":"Use standard notation like 'K11n34' (K = knot, 11 crossings, n = non-alternating, 34th in table). Check spherogram's knot_table for available names.","cause":"Knot name not in the internal database or string malformed.","error":"ValueError: Unrecognized knot name"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}