0

I've just started using Ipython/Jupyter notebook and i am following this tutorial http://chrisalbon.com/jupyter/ipython_display_image.html

I opened Ipython on my terminal and wrote

from IPython.display import Image
from IPython.display import display
display(Image(url='http://history.nasa.gov/ap11ann/kippsphotos/5903.jpg'))

All I'm getting is: IPython.core.display.Image at 0x7fc0ab9d23d0

How do I see the image? Thanks for you help!

2
  • 3
    Have you tried in a notebook, not in a terminal ? Commented Apr 30, 2016 at 20:01
  • @manu190466 That's the point: Many examples don't make it clear that this is simply not supported from an IPython.embed(). It's confusing especially when coming from matplotlib, which works just fine from a terminal. No need to downvote, it's a perfectly valid question. Commented Jun 2, 2017 at 11:54

2 Answers 2

1

Your code is correct, but you need to run it inside Jupyter

For more information: http://jupyter.org

Sign up to request clarification or add additional context in comments.

Comments

0

I was also expecting that this would work from withing a terminal / IPython.embed().

The documentation of IPython.display makes it clear though that this is not supported:

Display a Python object in all frontends.

By default all representations will be computed and sent to the frontends. Frontends can decide which representation is used and how.

In terminal IPython this will be similar to using :func:print, for use in richer frontends see Jupyter notebook examples with rich display logic.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.