Skip to content

Sage cannot start Jupyter notebook #258458

@Wulfsta

Description

@Wulfsta

Describe the bug

Running sage -n jupyter fails.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add sageWithDocs to systemPackages.
  2. Run sage -n jupyter.
  3. Observe error.

Additional context

Error log:

sage -n jupyter                    
/nix/store/y63dna6c1kbilzzm56l9376xpi0z0mjs-python3-3.10.12-env/lib/python3.10/site-packages/sage/repl/ipython_kernel/install.py:271: UserWarning: the kernel named sagemath does not seem to correspond to this installation of SageMath; check your Jupyter configuration (see https://docs.jupyter.org/en/latest/use/jupyter-directories.html)
  warnings.warn(f'the kernel named {ident} does not seem to correspond to this '
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.0, Release Date: 2023-05-20                    │
│ Using Python 3.10.12. Type "help()" for help.                      │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...
Traceback (most recent call last):
  File "/nix/store/x0v3x539321f7krfhaai5g5mahjj0ka3-sage-with-env-10.0/bin/sage-notebook", line 32, in __init__
    from notebook.notebookapp import main
ModuleNotFoundError: No module named 'notebook.notebookapp'
The Jupyter notebook is not installed (at least not in this Sage installation).
You can install it by running
  sage -i notebook
Alternatively, you can follow the instructions at
  https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation
to use Sage with an existing Jupyter notebook installation.

Notify maintainers

@collares

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.39, NixOS, 23.11 (Tapir), 23.11pre530560.f5892ddac112`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: jupyterInteractive computing tooling: kernels, notebook, jupyterlab
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions