fails to get graph_editor() to work

111 views
Skip to first unread message

pong

unread,
Aug 27, 2020, 11:45:35 AM8/27/20
to sage-support

Running sagemath 9.1 from a jupyter notebook

When calling graph_editor() got the following error message.
How can I make the module 'sagenb' works again?

ge.png

Dima Pasechnik

unread,
Aug 27, 2020, 11:48:32 AM8/27/20
to sage-support
sagenb does not work with Python 3. You'd need Sage 9.1 (or earlier) built with Python2 in order to be able to use sagenb.

And sagenb will be definitely gone in 9.2, which won't support Python 2.

HTH
Dima

ge.png

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/772c9f8f-e27f-4485-8add-ca97d51290bbn%40googlegroups.com.

pong

unread,
Aug 29, 2020, 2:27:33 AM8/29/20
to sage-support
I see. Is there a substitute for graph_editor()? It's fairly convenient.

Jean-Florent Raymond

unread,
Aug 29, 2020, 5:11:12 AM8/29/20
to sage-s...@googlegroups.com
Hello,

I recently started developing a replacement to graph_editor for the
jupyter notebook, using ipywidgets and ipycanvas.
You can find it at the following address :
https://gitlab.limos.fr/jfraymon/phitigra

This is still work in progress but the basic editor (adding removing
vertices and edges, displaying the graph, etc.) works.
One feature that this editor will have is that changes made to the graph
outside of the editor will be automatically updated in the editor. This
will for instance allow to display step by step the computation done by
a function (for teaching, or debugging, or ...).

Any feedback is welcome.

Jean-Florent.
>>> <https://groups.google.com/d/msgid/sage-support/772c9f8f-e27f-4485-8add-ca97d51290bbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>

pong

unread,
Aug 29, 2020, 8:35:31 PM8/29/20
to sage-support
Thanks you. I clone the project but confused what to do next. In the README, it saids

Change to the root directory and run:
$ sage -pip install --upgrade --no-index -v .

which root directory are we talking about? the phitigra directory?
Also should it be sage -pip install phitigra --upgrade -no-index -v?

In any case, I couldn't get it install so I must be doing something wrong. Please help.

Jean-Florent Raymond

unread,
Aug 30, 2020, 3:25:11 AM8/30/20
to sage-s...@googlegroups.com
Hello,

Yes, the directory where to run
sage -pip install --upgrade --no-index -v .
is the directory of the just cloned project (default: phitigra).
There is no need to add 'phitigra' to the command line: pip will guess
alone what to install from this directory.

Jean-Florent.

pong

unread,
Aug 30, 2020, 5:03:29 PM8/30/20
to sage-support
Hi Jean-Florent,

     I did exactly just that (see attachment) but it complains about the need of at least one requirement to install.
Please advise.
installerr.png

Dima Pasechnik

unread,
Aug 30, 2020, 5:13:55 PM8/30/20
to sage-support
On Sun, Aug 30, 2020 at 10:03 PM pong <wypo...@gmail.com> wrote:
>
> Hi Jean-Florent,
>
> I did exactly just that (see attachment) but it complains about the need of at least one requirement to install.
> Please advise.

how about just doing

sage --python setup.py install

in the root directory of phitigra ?
it works for me.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/6a7f10e2-83c7-470d-91c2-4cd3d9f7bd6cn%40googlegroups.com.

pong

unread,
Aug 30, 2020, 6:15:00 PM8/30/20
to sage-support
Thanks, sage --python setup.py install works for me as well!

However, when I try the code in the README

from phitigra import EditableGraph 
eg = EditableGraph(graphs.RandomGNP(10, 0.5)) 
eg.show()

It gives a static picture of a graph. But I can't click to create new nodes nor drag any node with a mouse.

Jean-Florent Raymond

unread,
Aug 31, 2020, 3:29:40 AM8/31/20
to sage-s...@googlegroups.com
Thanks for reporting this.
On my machine it works with the version of sage I was using at the
beginning of summer (version 9.2.beta1, release date: 2020-06-13) but
fails when I compile the latest version from develop.
I will investigate and try to fix this problem.

Dima Pasechnik

unread,
Aug 31, 2020, 3:51:04 AM8/31/20
to sage-support


On Mon, 31 Aug 2020, 08:29 Jean-Florent Raymond, <J-Floren...@uca.fr> wrote:
Thanks for reporting this.
On my machine it works with the version of sage I was using at the
beginning of summer (version 9.2.beta1, release date: 2020-06-13) but
fails when I compile the latest version from develop.
I will investigate and try to fix this problem.

a bunch of Jupyter-related packages has been updated since.

Jean-Florent Raymond

unread,
Aug 31, 2020, 10:15:14 AM8/31/20
to sage-s...@googlegroups.com
Actually the problem came from ipycanvas
(https://github.com/martinRenou/ipycanvas/issues/117 ) and not sage.
Downgrading to version 0.4.7 ( sage -pip install ipycanvas==0.4.7 )
solved the problem.

pong

unread,
Sep 1, 2020, 12:51:34 PM9/1/20
to sage-support
Downgraded to ipycancas 0.4.7.

It works for me now. Many thanks to both of you.
Reply all
Reply to author
Forward
0 new messages