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

asked 2018-07-19 14:50:09 +0100

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 17:01:19 +0100 )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 18:13:20 +0100 )edit

How do you start the Jupyter Notebook?

slelievre gravatar imageslelievre ( 2018-07-20 18:59:22 +0100 )edit

run the following command in terminal. sage -n jupyter

danny gravatar imagedanny ( 2018-07-22 07:46:50 +0100 )edit

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

slelievre gravatar imageslelievre ( 2018-07-25 06:30:40 +0100 )edit