如何在 Jupyter Notebook (Markdown) 中从 URL 插入图像

tkx*_*gle 5 python markdown python-3.x jupyter-notebook jupyter-lab

我想在 Jupyter Notebooks 的 Markdown 代码块中插入来自 URL 源的图像。

到目前为止,这就是我所拥有的:

![image info](https://scikit-learn.org/stable/_static/ml_map.png)
Run Code Online (Sandbox Code Playgroud)

但是,当我运行单元格时,它不包含和图像。

Gra*_*ray 0

我输入的代码与您的代码略有不同。当降价单元运行时,我得到了要显示的图像。

以下是用于在 Markdown 单元格中显示 .jpg 的代码。下面还附有输出的照片。

![image.png](https://scikit-learn.org/stable/_static/ml_map.png
Run Code Online (Sandbox Code Playgroud)

注意:代码未显示在下面的照片中,因为 Markdown 单元已运行 - 导致 .jpg 显示和隐藏代码。那是一张大.jpg。我可能会将这样的大 .jpg 文件下载到 PC,然后使用照片编辑器更改比例以使 .jpg 更小。然后只需使用基本相同的代码,但在路径中使用 PC 上的某个文件夹。

在此输入图像描述