Using a Sage laptop and IPython on the same page? Or rather combine them?

I am new to Sage and Python. To write a sage program, I went to the sagemat cloud, and when I tried to create a new file, I had, in particular, two options: the sage worksheet and IPython. I noticed both colors and padding. But I was wondering: is there a way to use them together? How can I combine them together? For example, in an IPython laptop, how can I make it understand sage commands?

To give an explicit and concrete example of the above, there is a factor (-2007) in Sage textbooks. If you run it on a sage sheet, it gives (as you expect) -1 -1 3 ^ 2 * 223, but on an IPython laptop it shows that the “factor” is not defined. How can I write the coefficient (-2007) in IPynb, run it and get -1 * 3 ^ 2 * 223?

I work in an environment with windows 8, 64 bits, only if it is relevant.

+4
source share
2 answers

On a machine with everything appropriately configured, such as https://cloud.sagemath.com , you can simply type

%load_ext sage

IPython, Sage ( , ). , . (. , - .)

enter image description here

+7

. IPython Jupyter.

Sage Jupyter,

  • ​​Python2 %load_ext sage
  • ​​SageMath, %load_ext sage.

, Kernel > Change Kernel, , File, Edit, View, Insert, Kernel, Help.

, SageMath Windows,

64- Windows.

SageMath, Sage REPL ( ) Jupyter, SageNB.

JupyterLab, sage --pip install jupyterlab, JupyterLab, sage -n jupyterlab.

, sage -n jupyter Jupyter, sage -n sagenb SageNB.

CoCalc, SageMathCloud.

0

Source: https://habr.com/ru/post/1538698/


All Articles