首页 文章

使用Azure CLI在HDInsight上安装外部python包:RdfeResourceHandlerException

提问于
浏览
1

我想在MS Azure HDInsight群集上安装pyobdc python包,以便在pyspark作业中使用 . 在this之后,我尝试使用"script action"完成此操作 . bash脚本是:

#!/usr/bin/env bash
sudo /usr/bin/anaconda/bin/conda install pyodbc

在选项中,可以使用Web界面(azure portal)或CLI命令行(doc)提交脚本操作 . 在Web界面中,使用info "New script actions can be submitted after the current cluster operation finishes."停用提交选项 . 我不知道这个集群操作是什么 .

我试图使用CLI命令行:

$ azure hdinsight script-action create my_cluster_name -g my_resource_group -n ipyodbc -u adl://my_data_lake_store.azuredatalakestore.net/clusters/scripts/script_actions/install_pyodbc.sh -t headnode;workernode

失败的是:

info:执行命令hdinsight script-action create / error:抛出了类型为“Microsoft.ClusterServices.RDFEProvider.ResourceTypes.Models.RdfeResourceHandlerException”的异常 . -error:错误信息已记录到/home/myself/.azure/azure.err错误:hdinsight script-action create命令失败

我试图用公共uri(dropbox)更改脚本位置,我得到了同样的错误 . 任何帮助或解决方法将不胜感激!干杯!

1 回答

  • 0

    我也得到了模糊的错误'Microsoft.ClusterServices.RDFEProvider.ResourceTypes.Models.RdfeResourceHandlerException' .

    在我的情况下,它是由于在命令中不包括conda的路径而只是使用 conda 而不是 /usr/bin/anaconda/bin/conda .

    您可能尝试解决两个问题:

    • 删除sudo,你不应该需要这个来执行custer上的命令并可能提示输入密码 .

    • 将-y开关添加到命令,例如 /usr/bin/anaconda/bin/conda install -y pyodbc 这会阻止提示

    我的假设是 hdinsight script-action create 命令没有't like being held up and if it gets stuck it returns this uninformative and from what I could find (or couldn' t)无证错误 .

相关问题