Not sure what prevents this from working.
A similar question was asked recently on Ask Sage:
How to LaTeX the graph of a permutation?
Could you try the following workarounds below,
inspired by the answers to that question?
One solution is to use the optional package slabbe.
The other one is to define:
def graph_from_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
return DiGraph(ee, loops=True)
and then you can do:
sage: p = Permutation([3, 2])
sage: g = graph_from_permutation(p)
sage: show(g)
Or you could define
def show_permutation(perm):
ee = [(i+1, perm[i]) for i in range(len(perm))]
g = DiGraph(ee, loops=True)
show(g)
and you could directly call
sage: show_permutation(Permutation([3, 2]))