如何在 Google Dataproc 集群中安装 python 包
How to install python packages in a Google Dataproc cluster
是否可以在 Google Dataproc 集群创建和 运行 后安装 python 包?
我尝试在 master 命令行中使用“pip install xxxxxxx
”,但它似乎不起作用。
Google的Dataproc文档没有提到这种情况。
创建集群后一般不能这样。我建议使用初始化操作来执行此操作。
正如您所注意到的,pip
默认情况下也不可用。所以你需要 运行 easy_install pip
然后是 pip install
命令。
最后,如果您打算在任何自动化中使用此集群,and/or 您想要密封性,我建议创建一个 wheel
存储在 GCS 中并在 init 操作中下载。然后你会安装你的轮子。 Wheels 增加了比直接从 pip 安装许多包更快的好处。
2019更新
请参阅本教程,了解如何在 Dataproc 上配置 Python 环境:
https://cloud.google.com/dataproc/docs/tutorials/python-configuration
是否可以在 Google Dataproc 集群创建和 运行 后安装 python 包?
我尝试在 master 命令行中使用“pip install xxxxxxx
”,但它似乎不起作用。
Google的Dataproc文档没有提到这种情况。
创建集群后一般不能这样。我建议使用初始化操作来执行此操作。
正如您所注意到的,pip
默认情况下也不可用。所以你需要 运行 easy_install pip
然后是 pip install
命令。
最后,如果您打算在任何自动化中使用此集群,and/or 您想要密封性,我建议创建一个 wheel
存储在 GCS 中并在 init 操作中下载。然后你会安装你的轮子。 Wheels 增加了比直接从 pip 安装许多包更快的好处。
2019更新
请参阅本教程,了解如何在 Dataproc 上配置 Python 环境: https://cloud.google.com/dataproc/docs/tutorials/python-configuration