【问题标题】:How do I upgrade a library in Qubole's Jupyter Notebook, using PySpark?如何使用 PySpark 升级 Qubole 的 Jupyter Notebook 中的库?
【发布时间】:2019-12-06 16:28:06
【问题描述】:

有没有办法直接从笔记本中的单元格进行操作?类似于pip install ... --upgrade 我不知道该怎么做https://docs.qubole.com/en/latest/faqs/general-questions/install-custom-python-libraries.html#pre-installed-python-libraries 上的指示 当前的 Python 版本是 3.5.3,Pandas 是 0.20.1。我需要升级 Pandas 和 Matplotlib

【问题讨论】:

    标签: qubole


    【解决方案1】:

    在 Qubole 中有两种方法可以升级/安装 python 环境的包。目前笔记本内部没有安装新包的接口。

    新的和推荐的方式(通过包管理):用户可以为帐户启用包管理功能,并通过 UI 将新包添加到集群。在性能和可用性方面,与集群版本相比,使用包管理有很多优势。详情请参阅https://docs.qubole.com/en/latest/user-guide/package-management/index.html

    旧方式(通过引导程序):用户可以配置引导程序,它基本上是在集群启动和/或升级时在每个节点上执行的 shell 脚本(更多节点被添加到集群中)。这可以通过集群 UI 进行配置,并且每次更改都需要集群启动。这是您分享的链接中的说明。

    【讨论】:

    • 谢谢,我可以通过环境下载到我需要的包版本
    【解决方案2】:

    您不能直接从笔记本中的单元下载/升级包。这是因为您的笔记本与集群相关联。现在,要确保集群的所有节点都安装了包,您必须使用包管理 (https://docs.qubole.com/en/latest/user-guide/package-management/package-management-environment.html) 或集群的节点引导程序 (https://docs.qubole.com/en/latest/user-guide/clusters/run-scripts-cluster.html#examples-node-scripts)。

    如果您还有其他问题,请告诉我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-23
      • 1970-01-01
      • 2020-01-04
      • 2020-06-24
      • 1970-01-01
      • 2017-06-06
      • 2020-09-11
      相关资源
      最近更新 更多