python - Jupyter Notebook 中的图像 ipynb 未显示在 GitHub 私有(private)仓库中,但相同的代码适用于公共(public)仓库

标签 python github jupyter-notebook markdown jupyter

我的 GitHub 存储库中有一个 Jupyter Notebook .ipynb 文件。它应该通过以下 Markdown 代码显示图像:

![image](image.png)

当存储库公开时,图像会显示。但是,当存储库设置为私有(private)时,只有替代标题“图像”可见并且图像不会加载。如果我右键单击它并选择“查看图像”,图像加载正常。

.md Markdown 文件也不存在此问题:上面的同一行适用于公共(public)和私有(private)存储库。

this answer它描述了如何将图像嵌入.ipynb 文件中,但这不是我要找的。我想动态显示 .png 文件。

最佳答案

截至 2015 年,Jupyter notebooks are rendered on GitHub using nbviewer .他们在这篇博文中指出:

Second, because of security concerns, some features available on nbviewer will not be available on GitHub. For example, GitHub will not render any dynamic output display that uses JavaScript, custom CSS, and most custom HTML embedded in Markdown or in outputs. When this is the case, and GitHub cannot fully render your notebooks, you will see an icon that allows you to view the full notebook on nbviewer.

issue thread有一些用户说注销/登录将解决问题。其他人说它会随着时间的推移而解决。但似乎没有公认的解决方案。

关于python - Jupyter Notebook 中的图像 ipynb 未显示在 GitHub 私有(private)仓库中,但相同的代码适用于公共(public)仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55751415/

相关文章:

ios - CMMotionManager 引用框架

jupyter-notebook - Jupyter 笔记本自动完成显示重复选项

python:过滤几乎相同文本的算法

Python 乘法相当于整数除法

python - dunder 包属性不返回包名称

python - ImageDataBunch 函数未定义-FastAI windows

pandas - IPython/pandas 中的格式问题

python - 在 python 中创建列表的 "for"循环和 "if"条件

git - 将存储在 github 上的项目部署到 debian 网络服务器

javascript - 如何运行从 github fork 的 Node.JS 应用程序?