How to configure jupyter for Sage-specific use?

asked 2019-01-12 11:00:58 -0500

bekalph gravatar image

I am an absolute beginner in using jupyter-notebooks. Since SageMath version 8.5 the user is asked to be prepared for using jupyter as the standard notebook in the future. So, in Linux I activate jupyter with ./ sage -n jupyter and do some experiments. In this way, obviously, SageMath activates an internal jupyter package via an internal notebook-interface (and not via an external jupyter installation e.g. in anaconda). I tried also to edit python code within a jupyter cell. I got some unexpected errors, so editing code in jupyter cells seems to be problematic. Also, I want to figure out, why editing python code within a jupyter cell changes the color marks of some 'if' statements to red? Sometimes, after re-opening a closed jupyter session appears as plain text only, i.e., without cells.

My simple question is therefore: Is there any documentation available for the sage-specific use of jupyter (e.g., meaning of color code for the elements of the python language, extra necessary import of additional sage objects for jupyter, configuration of jupyter, etc)?.

edit retag flag offensive close merge delete

Comments

1

Please be more specific. When you edit/run what code in a Jupyter cell, what error do you get? Can you do 1+1?

rburing gravatar imagerburing ( 2019-01-13 04:27:00 -0500 )edit

Indeed, normally the Sage Jupyter kernel works fine at least for most basic use cases, so you'll have to be more specific. Sage has its own kernel for Jupyter so normally there isn't any "sage-specific" configuration needed (although sometimes there is fidgeting needed for things like 3D plots).

Is it possible you're running some additional plugins/add-ons in Jupyter that might interact badly? The experience you seem to be describing is not typical.

Iguananaut gravatar imageIguananaut ( 2019-01-14 06:45:37 -0500 )edit