Opened 2 years ago
Closed 21 months ago
#25384 closed enhancement (fixed)
Let `sage jupyter` call the Jupyter in Sage
Reported by:  mlapointe  Owned by:  

Priority:  major  Milestone:  sage8.7 
Component:  packages: standard  Keywords:  thursdaysbdx; jupyter nbconvert 
Cc:  nthiery, slelievre  Merged in:  
Authors:  Sébastien Labbé  Reviewers:  Samuel Lelièvre 
Report Upstream:  N/A  Work issues:  
Branch:  1f208f2 (Commits)  Commit:  1f208f244d9ffa4c6a5f24a4c064cd7a73bc2fe1 
Dependencies:  Stopgaps: 
Description (last modified by )
We should make it so that sage jupyter
calls the jupyter
shipped by Sage, and thus make it possible to do things like
sage jupyter kernelspec install /path/to/some_jupyter_kernel
and so on.
Likewise, the following converts a ipynb file to a html slides presentation:
sage ipython nbconvert filename.ipynb to slides [TerminalIPythonApp] WARNING  Subcommand `ipython nbconvert` is deprecated and will be removed in future versions. [TerminalIPythonApp] WARNING  You likely want to use `jupyter nbconvert` in the future
and it would be nice to be able to run
sage jupyter nbconvert filename.ipynb to slides
but it currently gives the following error:
sagerun received unknown option: jupyter usage: sage [options] Try 'sage h' for more information.
The list of external programs we can run with sage <program>
or sage <program>
is obtained by running
sage advanced
Change History (9)
comment:1 Changed 2 years ago by
 Description modified (diff)
 Summary changed from jupyter nbconvert unknown option to let `sage jupyter` work call the Jupyter in Sage
comment:2 Changed 2 years ago by
 Cc nthiery slelievre added
comment:3 Changed 2 years ago by
 Description modified (diff)
 Summary changed from let `sage jupyter` work call the Jupyter in Sage to let `sage jupyter` call the Jupyter in Sage
comment:4 Changed 2 years ago by
 Type changed from defect to enhancement
I wouldn't say it's a defect. It's just not a feature that exists in the commandline interface. You can run any shell command in Sage's environment with sage sh <whatever>
. But I agree it would be a useful one to exist.
I've actually been thinking again lately about how to redesign Sage's commandline interface (both the UI and the implementation) but that's not a new subject, and it's pretty low priority. Adding a new flag for a specific executable is not a big deal though.
comment:5 Changed 2 years ago by
 Milestone changed from sage8.3 to sage8.4
update milestone 8.3 > 8.4
comment:6 Changed 22 months ago by
 Branch set to u/slabbe/25384
 Commit set to 1f208f244d9ffa4c6a5f24a4c064cd7a73bc2fe1
 Status changed from new to needs_review
New commits:
1f208f2  25384: sage jupyter command line

comment:7 Changed 22 months ago by
I haven't tested it, but the diff looks fine. And I am +++1 on the feature! Thank you Sébastien!
comment:8 Changed 22 months ago by
 Milestone changed from sage8.4 to sage8.7
 Reviewers set to Samuel Lelièvre
 Status changed from needs_review to positive_review
 Summary changed from let `sage jupyter` call the Jupyter in Sage to Let `sage jupyter` call the Jupyter in Sage
Tried it. Works fine for me. Much appreciated!
comment:9 Changed 21 months ago by
 Branch changed from u/slabbe/25384 to 1f208f244d9ffa4c6a5f24a4c064cd7a73bc2fe1
 Resolution set to fixed
 Status changed from positive_review to closed
Original summary of this ticket: "jupyter nbconvert unknown option"
It's not that
jupyter nbconvert
is not known, it's that we don't providesage jupyter
(we should!).