【问题标题】:Binder Jupyter notebook missing some dependencies from environment.ymlBinder Jupyter notebook 缺少 environment.yml 中的一些依赖项
【发布时间】:2018-12-10 21:33:20
【问题描述】:

我有一个安装在 Binder 上的 Jupyter 笔记本。一般来说,它工作得很好,我在 binder/environment.yml 中指定了我的依赖项。但是,我的依赖项之一——xlwt——被忽略了,即使它在我的环境文件中。

我所有的其他依赖项都是从 environment.yml 中正确提取的,所以我想知道有什么区别。 xlwt 不是在 notebook 中直接调用的,而是被 pandas 用来导出到 Excel 中的。

查看构建日志,我发现该模块从未安装到环境中。有没有办法强制呢?也许我应该改用 Dockerfile?

https://mybinder.readthedocs.io/en/latest/using.html#preparing-a-repository-for-binder

【问题讨论】:

    标签: python jupyter-notebook


    【解决方案1】:

    通常,只有非常复杂的环境才需要 Dockerfile。
    我怀疑你需要 pip install xlwt 而不是依赖 anaconda 发行版。有时很难知道用哪一个来处理似乎可以由任何一方处理的事情,你必须尝试一些组合。此示例 here 展示了如何结合使用的 pip 在 environment.yml 文件中安装 xlwt

    【讨论】:

      猜你喜欢
      • 2019-04-14
      • 2021-10-29
      • 1970-01-01
      • 2020-03-25
      • 2017-12-25
      • 2015-04-18
      • 2020-03-24
      • 2012-07-12
      • 1970-01-01
      相关资源
      最近更新 更多