jupyter and python incompatibility in Sage 7.3?

229 views
Skip to first unread message

Stan

unread,
Sep 13, 2016, 5:10:15 AM9/13/16
to sage-devel
Dear all,
I keep running into problems in Sage 7.3 that I did not have in 6.8. Example: https://groups.google.com/forum/#!topic/sage-devel/nbV2VGIhD1s
The newest one seems to be explained here:
https://trac.macports.org/ticket/51167

Every time I run either jupyter nbconvert or ipython nbconvert, I get the following error message:
ImportError: No module named entrypoints

The explanation in the above ticket was that "entrypoints has been added, but does not work with python2.7".
Is there a way to fix this?

Cheers
Stan

Stan

unread,
Sep 13, 2016, 5:34:10 AM9/13/16
to sage-devel
Actually, I am a bit confused here. For some reason jupyter is not found when I call it at the prompt, using Debian Jessy. Why is it found when I call it from within a jupyter notebook using %%sh or os.system?
When I run ipython from the command line on one of my ipynb files, I get the following error message:
NBFormatError: Unsupported nbformat version 4

Jeroen Demeyer

unread,
Sep 13, 2016, 5:42:30 AM9/13/16
to sage-...@googlegroups.com
On 2016-09-13 11:10, Stan wrote:
> Every time I run either jupyter nbconvert or ipython nbconvert, I get
> the following error message:
>
> ImportError: No module named entrypoints

This might have been fixed by
https://trac.sagemath.org/ticket/21261

Jeroen Demeyer

unread,
Sep 13, 2016, 5:46:05 AM9/13/16
to sage-...@googlegroups.com
On 2016-09-13 11:34, Stan wrote:
> Actually, I am a bit confused here. For some reason|||jupyter| is not
> found when I call it at the prompt, using Debian Jessy. Why is it found
> when I call it from within a jupyter notebook using %%sh or os.system?

Because Jupyter is installed within Sage. You need to run jupyter from a
Sage shell:

$ sage --sh

(sage-sh) $ jupyter nbconvert --help
This application is used to convert notebook files (*.ipynb) to various
other formats.
[...]

Stan

unread,
Sep 13, 2016, 6:40:49 AM9/13/16
to sage-devel
Awesome, thanks! I should have looked for a ticket involving nbconvert directly in sage-trac instead of the www.
Would it be a possible workaround to just pip install entrypoints and configparser?

I also didn't relaise that the %%sh magic takes me to the sage shell, not the shell of my os. Thanks for letting me know.

Cheers
Stan

Stan

unread,
Sep 13, 2016, 7:07:55 AM9/13/16
to sage-devel
OK, just to confirm, an easy workaround is, in a terminal:
sage --sh
pip install entrypoints
pip install configparser

Thanks a lot for your help!!!
Stan

Jeroen Demeyer

unread,
Sep 13, 2016, 8:27:38 AM9/13/16
to sage-...@googlegroups.com
On 2016-09-13 12:40, Stan wrote:
> Would it be a possible workaround to just pip install entrypoints and
> configparser?

Just entrypoints would be sufficient.

Stan

unread,
Nov 4, 2016, 9:28:39 AM11/4/16
to sage-devel
I just tried to do the same for the sage appliance in windows for a colleague, but I pip install does not seem to work there. What is the trick to install entrypoint in the VMbox version of sage?
Reply all
Reply to author
Forward
0 new messages