python - 为什么我的 Bokeh 图在 github 上不起作用?

标签 python git github ipython-notebook bokeh

我在 github 上有一个私有(private)仓库,我正在试验 Bokeh 。我在本地编辑我的 ipython 笔记本中的文件,我可以看到绘图有效。当我将它们推送到 github 上并尝试在线可视化时,我可以看到除图表之外的所有代码。

在 nbviewer 上,我可以看到其他使用 Bokeh 的笔记本。 github渲染引擎和nbviewer有区别吗?

最佳答案

我知道这已经很旧了,但是如果以后有人遇到它...

有两种可能:

  1. GitHub 不支持使用 Javascript、自定义 CSS 等的动态输出

    http://blog.jupyter.org/2015/05/07/rendering-notebooks-on-github/

    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.

  2. 当您在本地查看笔记本时,它可能链接到 Ipython 内核,因此使用 Python 来显示图形。当您在 GitHub 上查看时,没有 Ipython 内核,因此无法生成图表。在静态笔记本中只会看到简单的静态图形(例如 matplotlib 图形)。

关于python - 为什么我的 Bokeh 图在 github 上不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32518342/

相关文章:

javascript - 以编程方式在 GitHub 上查找库的 'main' javascript 文件

Python 错误 : OSError: [Errno 22] Invalid argument

python - python中的局部/全局变量混淆

python - 为什么 'module' 对象在 python opencv 中不可调用?

python - Django 调试工具栏安装问题

git - 如何在 Git 存储库中找到具有多个父级的所有提交?

database - 如何在git中保留文件权限?

git - GitHub 可以删除您的帐户吗?

linux - Git init 仍然给我 master 而不是我配置中的默认分支名称(main)

ruby - 让用户知道您的 Github 分支不再维护(即已合并)的最佳方式?