Problem with jupyter-notebook

Artemio González López artemiog at mac.com
Sun Jun 23 17:03:12 UTC 2024


I am having a problem with the jupyter-notebook port (both 3.11 and 3.12) under MacOS 14.5 (Sonoma) on an M1 13” MacBook Pro. More specifically, jupyter-notebook launches and allows me to navigate my hard disk. However, when I click on a notebook to try to edit/run it a new tab is opened in Safari, but it remains empty, and I get the following error in the terminal window:

[I 2024-06-23 18:55:44.134 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2024-06-23 18:56:02.144 ServerApp] 500 GET /api/nbconvert?1719161760917 (::1): Could not import nbconvert: No module named 'jupyterlab_pygments'
[W 2024-06-23 18:56:02.144 ServerApp] wrote error: "Could not import nbconvert: No module named 'jupyterlab_pygments'"
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jupyter_server/services/nbconvert/handlers.py", line 34, in get
        from nbconvert.exporters import base
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/exporters/__init__.py", line 1, in <module>
        from .asciidoc import ASCIIDocExporter
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/exporters/asciidoc.py", line 9, in <module>
        from .templateexporter import TemplateExporter
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/exporters/templateexporter.py", line 31, in <module>
        from nbconvert import filters
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/filters/__init__.py", line 18, in <module>
        from .strings import (
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/filters/strings.py", line 23, in <module>
        from nbconvert.preprocessors.sanitize import _get_default_css_sanitizer
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/preprocessors/__init__.py", line 10, in <module>
        from .csshtmlheader import CSSHTMLHeaderPreprocessor
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nbconvert/preprocessors/csshtmlheader.py", line 10, in <module>
        from jupyterlab_pygments import JupyterStyle  # type:ignore[import-untyped]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ModuleNotFoundError: No module named 'jupyterlab_pygments'
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tornado/web.py", line 1790, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jupyter_server/auth/decorator.py", line 73, in inner
        return await out
               ^^^^^^^^^
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/jupyter_server/services/nbconvert/handlers.py", line 36, in get
        raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e
    tornado.web.HTTPError: HTTP 500: Internal Server Error (Could not import nbconvert: No module named 'jupyterlab_pygments')

Any idea what the problem might be?

Thanks a lot in advance,


Artemio Gonzalez Lopez
artemiog at mac.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240623/cb202e33/attachment.htm>


More information about the macports-users mailing list