如何在没有互联网的情况下在jupyter-notebook中使用ipywidgets
我使用 jupyter 笔记本和 ipywidgets 在 python 中开发了交互式应用程序,并使用 voila 来运行笔记本。 在我的开发系统(带有互联网)上,我的应用程序可以完美运行。但在没有互联网的系统上,应用程序无法加载。使用开发人员工具检查时,Web 应用程序正在尝试从 mathjax,font-awesome 和 这里
如果有人可以指导我如何解决这个问题?在没有互联网的情况下使用 ipywidgets 运行 jupyter 笔记本应用程序。我们可以更改一些设置/配置以使用这些依赖项的静态副本吗?
- - 更新 在没有互联网的系统上,运行 jupyter lab 和笔记本并运行单元格工作得很好。我能够查看字体很棒的图标和其他 ipywidgets。仅使用瞧,才能观察到此问题
。提前感谢您的帮助。
I have developed interactive application in python using jupyter notebook with ipywidgets and use voila to run the notebook.
On my development system (with internet) I have the application working flawlessly. But on the system without internet the application does not load. On inspection with developer tools, the web application is trying to load scripts from mathjax, font-awesome and here
If anyone could guide me on how to workaround this problem ? Run jupyter notebook application with ipywidgets without internet. Can we change some settings / configuration to use the static copy of these dependencies?
---- Update
On the system without internet, running jupyter lab and notebook and running the cells works perfectly fine. I am able to view the font-awesome icons and other ipywidgets. This issue is observed only using voila
Thanks in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看来我们需要在voila的模板中覆盖对CDN和Fontawesome的参考,并带有本地参考。
请从Jupyter话语论坛上找到回复在这里。
Looks like we need to override the references to cdn and fontawesome in the templates of voila with local references.
Please find the reply from Jupyter discourse forum here.
我对“font-awesome”图标也有同样的问题,它不适用于瞧。为了解决这个问题,我现在在描述字符串中使用 unicode 字符而不是图标属性。
I had the same issue about "font-awesome" icons which is not working with voila. To workaround it, I'm now using unicode characters in description strings instead of icon property.
Voila截至2023年3月,我仍然需要Internet上的一些脚本。
我试图通过自定义模板来修复它,但我无法为MathJax做到这一点。我通过用Nginx替换本地网址来替换Internet URL,并分享我的配置,因为它对其他人可能很有用。
voila still requires some scripts from internet as of March 2023.
I tried to fix it by customizing templates but I was not able to do it for MathJax. I worked it around by replacing internet URLs with local ones with nginx and I am sharing my config as it could be useful to someone else.