Skip to content

Conversation

@mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Aug 12, 2025

Per the (somewhat dated) Singular documentation @hannes14 (https://www.singular.uni-kl.de/index.php/graphical-interface.html), Singular can be used from a Jupyter notebook via @sebasguts's PySingular and jupyter-kernel-singular.

Here we add the single module providing the PySingular API into passagemath-singular, enabling use of jupyter-kernel-singular with it.

Declaring extras for easy installation, using one of:

$ pip install "passagemath-singular[jupyterkernel]"
$ pip install "passagemath-singular[notebook]"
$ pip install "passagemath-singular[jupyterlab]"

Part of:

@mkoeppe mkoeppe changed the title pkgs/sagemath-singular: Merge PySingular pkgs/sagemath-singular: Merge PySingular, declare "jupyterkernel" extra Aug 12, 2025
@mkoeppe

This comment was marked as resolved.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 12, 2025

jupyter-kernel-singular does not work with Python 3.13

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/jupyter_kernel_singular/__main__.py", line 2, in <module>
    from .kernel import SingularKernel
  File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/jupyter_kernel_singular/kernel.py", line 7, in <module>
    import imghdr
ModuleNotFoundError: No module named 'imghdr'

This is one of the removed "dead batteries". Replacement: https://pypi.org/project/standard-imghdr/

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 12, 2025

@sebasguts Do you accept patches to this old project of yours, or would you be willing to add me (and/or others) to https://pypi.org/project/jupyter-kernel-singular/ to post updated releases?

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 12, 2025

@mkoeppe mkoeppe force-pushed the passagemath-singular--include-PySingular branch from d68ab64 to 079c7f7 Compare August 12, 2025 06:35
@mkoeppe mkoeppe merged commit b2e7ed7 into main Aug 12, 2025
4 of 10 checks passed
@mkoeppe mkoeppe deleted the passagemath-singular--include-PySingular branch August 14, 2025 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants