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

asked 2018-07-19 07:50:09 -0500

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.

edit retag flag offensive close merge delete

Comments

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

slelievre gravatar imageslelievre ( 2018-07-19 10:01:19 -0500 )edit

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 ( 2018-07-19 11:13:20 -0500 )edit

How do you start the Jupyter Notebook?

slelievre gravatar imageslelievre ( 2018-07-20 11:59:22 -0500 )edit

run the following command in terminal. sage -n jupyter

danny gravatar imagedanny ( 2018-07-22 00:46:50 -0500 )edit

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

slelievre gravatar imageslelievre ( 2018-07-24 23:30:40 -0500 )edit