interact still using sagenb ?    
   SageMath 9.0 , Ubuntu 18.04.4 LTS
in sage terminal:
@interact
def _(n=(1,20)):
    print(factorial(n))
  gives the error:ModuleNotFoundError: No module named 'sagenb'
SageMath 9.0 , Ubuntu 18.04.4 LTS
in sage terminal:
@interact
def _(n=(1,20)):
    print(factorial(n))
  gives the error:ModuleNotFoundError: No module named 'sagenb'
As it is a graphical application, you should better run this in a jupyter notebook, not in the sage terminal. That said, on 9.1.beta4, i do not get your error, instead i got a piece of html.
but what you recommend does not apply for MatPlotLib Animation. see the post :matplotlib Animation in Jupyter notebook
(works in sage terminal but does not work in Jupyter notebook)
Asked: 2020-03-09 09:40:50 +0100
Seen: 1,069 times
Last updated: Mar 09 '20
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.