IPython.display没有显示输出没有错误

时间:2018-09-20 09:34:53

标签: ipython jupyter

我正在尝试使用Python 2将gif绘制到jupyter笔记本中。 我写了以下代码:

from IPython.display import Image
Image(url='/relative/path/image.gif')

我在图像上报告了输出,没有错误。

enter image description here

我在网上搜索:代码看起来写得不错,但是...我无法使其正常工作


更新

我已经弄清楚了为什么没有显示出结果。 声明的路径必须不带初始“ /”。 例如:

from IPython.display import Image
Image(url='relative/path/image.gif')

0 个答案:

没有答案
相关问题