小编Sat*_*aba的帖子

Dataspell 输出以下错误:在 jupyter-notebook 中使用时,本地 cdn 资源在 chrome/safari 上有问题

遇到这样的错误:本地cdn资源在jupyter-notebook中使用时在chrome/safari上有问题。它在使用 pyvis 库时出现。

net = Network(notebook=True)

net.add_nodes(
    [1, 2, 3, 4, 5],  # node ids
    label=['Node #1', 'Node #2', 'Node #3', 'Node #4', 'Node #5'],  # node labels
    # node titles (display on mouse hover)
    title=['Main node', 'Just node', 'Just node', 'Just node', 'Node with self-loop'],
    color=['#d47415', '#22b512', '#42adf5', '#4a21b0', '#e627a9']  # node colors (HEX)
)
net.add_edges([(1, 2), (1, 3), (2, 3), (2, 4), (3, 5), (5, 1)])

net.show('graph.html')
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我尝试将浏览器切换到 dataspell

python graph jupyter-notebook pyvis dataspell

3
推荐指数
1
解决办法
5365
查看次数

标签 统计

dataspell ×1

graph ×1

jupyter-notebook ×1

python ×1

pyvis ×1