python - 如何在 Google Dataproc 集群中安装 python 包
问题描述
创建并运行集群后,是否可以在 Google Dataproc 集群中安装 python 包?
我尝试pip install xxxxxxx
在主命令行中使用“”,但它似乎不起作用。
Google 的 Dataproc 文档没有提到这种情况。
解决方案
创建集群后,这通常是不可能的。我建议使用初始化操作来执行此操作。
正如您所注意到pip
的,默认情况下也不可用。因此,您需要先运行easy_install pip
命令pip install
。
最后,如果您打算在任何自动化中使用此集群,和/或您想要密封,我建议您创建一个wheel
存储在 GCS 中并在 init 操作中下载的。然后你会安装你的轮子。与直接从 pip 安装许多软件包相比,Wheels 具有额外的好处。
2019 更新
请参阅本教程,了解如何在 Dataproc 上配置 Python 环境: https ://cloud.google.com/dataproc/docs/tutorials/python-configuration
推荐阅读
- php - wp-config.php 文件上的 Wordpress 错误“语法错误,意外的 'WP_DEBUG' (T_STRING)”
- java - java选择对象的实例
- csv - 错误:
属性高度:预期长度,“NaN” - r - 循环组并为每个组创建图 R
- c++ - 放宽内存顺序的原子加载和存储
- c++ - 以 Eigen 类型为参数的泛型函数回调
- r - 什么函数允许我根据 R 中列中的值从数据框中的列中提取数据?
- javascript - 使用 jQuery DataTable 如何通过在 C# 应用程序中调用 javascript 函数来启用/禁用列排序?
- java - Bluetooth scanner causing activity to clear
- reactjs - 如何同步从 Web API 后端发送到 React/Redux 前端的对象类型