【问题标题】:How to use IBM python module "pixiedust" in Google Colaboratory?如何在 Google Colaboratory 中使用 IBM python 模块“pixiedust”?
【发布时间】:2019-07-09 15:33:54
【问题描述】:

我对 IBM 开发的调试和可视化库 pixiedust 很着迷,想在 google colab 上试用一下。

我做了以下操作:

!pip install pixiedust

# matplotlib, seaborn, jinja2 are already installed in gcolab.

显示图表不起作用

import pixiedust
df = pixiedust.sampleData() # this shows the dataframe
display(df)  # This does not do anything.

调试也不行

import pixiedust

# Next cell
%%pixie_debugger
import random
def find_max (values):
    max = 0
    for val in values:
        if val > max:
            max = val
    return max
find_max(random.sample(range(100), 10))

# This gives nothing.

是否可以在 Google Colab 中使用 pixiedust,还是只能在 IMB 云中使用?

【问题讨论】:

    标签: python google-colaboratory pixiedust


    【解决方案1】:

    @astro123 可能有点晚了,但也许其他人也和我一样。所以这是我的解决方案。 如pixiedust install guidelines 中所述,https://pixiedust.github.io/pixiedust/install.html 你必须检查你有一个带有 pixiedust 的 jupyter 内核。在 colab 中运行

    !jupyter pixiedust list

    如您所见,默认情况下它没有带有 pixiedust 的内核,只需通过以下方式安装即可

     `   !jupyter pixiedust install`
    

    然后您可以在主面板上选择使用 pixiedust 内核运行。 它现在应该可以工作了,但是随着协作的不断发展,没有简单的演练。

    问候

    【讨论】:

    • 感谢胡安的努力。赞成,但是,这在 colab 中不起作用。你有任何用于调试的公共 gcolab 笔记本吗?
    • 好吧 astro,我现在没有时间或时间来深入检查,但据我所见,colab 仍然与 jupyter 兼容 60% 左右,这意味着,例如自动没有运行 Nbconverter 的幻灯片,因为 nbextension 提供的 RISE 不适用于 Colab。检查我的其他答案以获取替代建议,可能会为您提供正确的服务。问候
    猜你喜欢
    • 2019-08-23
    • 2023-03-04
    • 1970-01-01
    • 2019-07-02
    • 1970-01-01
    • 1970-01-01
    • 2018-08-15
    • 2022-01-04
    相关资源
    最近更新 更多