[英]Ipython not displaying image
I've just started using Ipython/Jupyter notebook and i am following this tutorial http://chrisalbon.com/jupyter/ipython_display_image.html 我刚刚开始使用Ipython / Jupyter笔记本,并且正在关注本教程http://chrisalbon.com/jupyter/ipython_display_image.html
I opened Ipython on my terminal and wrote 我在终端上打开Ipython并写道
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 我得到的是:位于0x7fc0ab9d23d0的IPython.core.display.Image
How do I see the image? 我怎么看图像? Thanks for you help!
感谢您的帮助!
Your code is correct, but you need to run it inside Jupyter
您的代码是正确的,但是您需要在
Jupyter
运行它
For more information: http://jupyter.org 有关更多信息: http : //jupyter.org
I was also expecting that this would work from withing a terminal / IPython.embed()
. 我还期望通过使用Terminal /
IPython.embed()
。
The documentation of IPython.display
makes it clear though that this is not supported: IPython.display
的文档明确指出了不支持的功能:
Display a Python object in all frontends.
在所有前端中显示一个Python对象。
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:
在终端IPython中,这类似于使用:func:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.