Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to get the same environment in "sage -ipython notebook" as in "sage"?

If I start the command line version of sage with sage and type

integrate(x^2,x)

I get

1/3*x^3

as desired.


However, if I start sage in IPython's notebook with sage -ipython notebook and type the same thing I get

NameError: name 'integrate' is not defined

Trying to fix this by defining some prerequisites

from sage.all import *
,var x

I now get

RuntimeError: Use ** for exponentiation, not '^', which means xor
in Python, and has the wrong precedence.


In other words, it is clear that sage -ipython notebook does not provide the same environment as sage.

How can I fix this? I just want an IPython notebook that works like my sage command line.

How to get the same environment in "sage -ipython notebook" as in "sage"?

If I start the command line version of sage with sage and type

integrate(x^2,x)

I get

1/3*x^3

as desired.


However, if I start sage in IPython's notebook with sage -ipython notebook and type the same thing I get

NameError: name 'integrate' is not defined

Trying to fix this by defining some prerequisites

from sage.all import *
,var x

I now get

RuntimeError: Use ** for exponentiation, not '^', which means xor
in Python, and has the wrong precedence.


In other words, it is clear that sage -ipython notebook does not provide the same environment as sage.

How can I fix this? I just want an IPython notebook that works like my sage command line.