How to show the output of print() in to jupyter notebook?

asked 6 years ago

danny gravatar image

In Sagemath's Jupyter Notebook, The output of print () always is showed into terminal. So for this reason, I can not get output of the functions such as graph_classes.Tree.description(). But in the anacanda's jupyter notebook for python, we can show the output of print() in jupyter notebook. How to solve the problem? Thanks.

Preview: (hide)

Comments

What is your operating system, and how did you install Sage?

slelievre gravatar imageslelievre ( 6 years ago )

My operating system is MacOS 10.13.5 and My SageMage is installed by using sage-8.2-OSX_10.11.6-x86_64.app.dmg. I find that print command in jupyter notebook always output to terminal from sagemath 7.

danny gravatar imagedanny ( 6 years ago )

How do you start the Jupyter Notebook?

slelievre gravatar imageslelievre ( 6 years ago )

run the following command in terminal. sage -n jupyter

danny gravatar imagedanny ( 6 years ago )

What do you mean by "always output to terminal from sagemath 7"?

slelievre gravatar imageslelievre ( 6 years ago )