【问题标题】:AttributeError: module 'IPython.core' has no attribute 'shadowns'AttributeError:模块“IPython.core”没有属性“shadowns”
【发布时间】:2019-11-19 18:12:45
【问题描述】:

我正在运行这些行

import dill
dill.load_session("session2.pkl")

并得到错误AttributeError: module 'IPython.core' has no attribute 'shadowns'。 我已将此会话保存在 Google Colab Notebooks 上。我怎样才能摆脱错误?

【问题讨论】:

标签: python ipython google-colaboratory jupyter-lab dill


【解决方案1】:

我使用了简单的解决方法:

import IPython
IPython.core.shadowns = 1

对于像googlegoogle.colab 这样缺少的一些额外包,我使用了

%%bash
mkdir google/colab
touch google/colab/__init__.py

【讨论】:

    猜你喜欢
    • 2018-04-14
    • 2019-02-18
    • 1970-01-01
    • 2020-01-01
    • 2019-07-20
    • 2021-11-05
    • 2021-11-04
    • 2021-02-23
    相关资源
    最近更新 更多