Ipython: Print function not working on Ipython notebook

Created on 26 Aug 2014  路  4Comments  路  Source: ipython/ipython

Anyone knows how to fix this bug where print 'hello world' don't show in output? http://stackoverflow.com/questions/25494182/print-not-showing-in-ipython-notebook-python

needs-info

Most helpful comment

The following seems to stop output cells from working if they have print statements in them. Instead, everything gets printed to the console and not inside the jupyter notebook.

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

Any hints? Everything seems to work fine on Python 2 notebooks where I don't need utf-8 support

All 4 comments

Can you tell us more about your system? Is this on Windows? It sounds an awful lot like #2499, can you take a look there and see if the solutions work for you? #3311 also has a possible workaround for Sophos

I didn't know how i resolved it but after not using ipython notebook for some time. And in the midst i had installed multiple python packages and now, it's working.

The following seems to stop output cells from working if they have print statements in them. Instead, everything gets printed to the console and not inside the jupyter notebook.

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

Any hints? Everything seems to work fine on Python 2 notebooks where I don't need utf-8 support

@pcuci see #8354

Was this page helpful?
0 / 5 - 0 ratings