Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to attach a simple Sage script in a Sage Jupyter notebook

My two PCs' configurations: Windows 8.1, Windows 10
Sage version: SageMath 8.3, windows installer 0.4
github.com/sagemath/sage-windows/releases

I want to use a Sage script in a Sage Jupyter Notebook (Jupyter with Sage as a kernel).

I have tried the following procedure:

  1. I put a Sage code (definition of a function) in text file named Script.sage.
  2. In a Jupyter notebook I tried command attach('Script.Sage')
  3. I got a usage error: UsageError: Invalid GUI request 'sage', valid ones are:[None, 'widget', 'qt5', 'qt', 'nbagg', 'osx', 'gtk', 'qt4', 'gtk3', 'notebook', 'tk', 'ipympl', 'inline', 'asyncio', 'wx']

Some advice about where is a problem? What to do? Or is there another procedure how to use a Sage code written in separate files in a Jupyter notebook?