如何使用 PySpark 升级 Qubole 的 Jupyter Notebook 中的库?

How do I upgrade a library in Qubole's Jupyter Notebook, using PySpark?

有没有一种方法可以直接从笔记本中的单元格中执行此操作?类似于 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 中,有两种方法可以 upgrade/install python 环境的包。目前笔记本内部没有可用的界面来安装新包。

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

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

您不能 download/upgrade 直接从笔记本中的单元格打包。这是因为您的笔记本与集群相关联。现在,要确保集群的所有节点都安装了软件包,您必须使用软件包管理 (https://docs.qubole.com/en/latest/user-guide/package-management/package-management-environment.html) or the cluster's node bootstrap (https://docs.qubole.com/en/latest/user-guide/clusters/run-scripts-cluster.html#examples-node-scripts)。

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