简体   繁体   English

如何在databricks集群上安装gdal?

[英]How to install gdal on databricks cluster?

I am trying to install the package GDAL on an Azure Databricks cluster.我正在尝试在 Azure Databricks 集群上安装 package GDAL。 In no way I can get it to work.我绝不能让它工作。

Approaches that I've tried but didn't work:我尝试过但没有奏效的方法:

  1. Via the library tab of the corresponding cluster --> Install New --> PyPi ( under Library Source ) --> Entered gdal under Package通过对应集群的library tab --> Install New --> PyPi (在Library Source下) --> 在Package下输入gdal

  2. Tried all approaches mentioned on https://forums.databricks.com/questions/13738/gdal-installation.html .尝试了https://forums.databricks.com/questions/13738/gdal-installation.html上提到的所有方法。 None of them worked.他们都没有工作。

Details:细节:

  1. Runtime: 6.1 (includes Apache Spark 2.4.4, Scala 2.11) (When using runtime 3.5 I got GDAL to work, however an update to a higher runtime was necessary for other reasons.)运行时: 6.1(包括 Apache Spark 2.4.4、Scala 2.11) (使用运行时 3.5 时,我让 GDAL 工作,但是由于其他原因需要更新到更高的运行时。)

  2. We're using python 3.7.我们正在使用 python 3.7。

I have already replied similar type of question.我已经回答过类似的问题。 Please check the below link would help you to install the required library:请检查以下链接将帮助您安装所需的库:

How can I download GeoMesa on Azure Databricks? 如何在 Azure Databricks 上下载 GeoMesa?

For your convenience I am pasting the Answer again... just you need to choose your required library from the search area.为了您的方便,我再次粘贴答案......您只需从搜索区域中选择所需的库。

You can install GDAL Library directly into your Databricks cluster.您可以将 GDAL 库直接安装到 Databricks 集群中。

1) Select the Libraries option then a new window will open. 1) Select 库选项然后一个新的 window 将打开。 在此处输入图像描述

2) Select the maven option and click on 'search packages' option 2) Select maven 选项并单击“搜索包”选项在此处输入图像描述

3) Search the required library and select the library/jar version and choose the 'select' option. 3) 搜索所需的库和 select 库/jar 版本并选择“选择”选项。 Thats it.而已。 在此处输入图像描述

After the installation of the library/jar, restart your cluster.安装库/jar 后,重新启动集群。 Now import the required classes in your Databricks notebook.现在在 Databricks 笔记本中导入所需的类。 I hope it helps.我希望它有所帮助。 Happy Coding..快乐编码..

Finally we got it working by using an ML runtime in combination with the answer given in forums.databricks.com/answers/21118/view.html.最后,我们结合使用ML运行时和 forums.databricks.com/answers/21118/view.html 中给出的答案来让它工作。 Apparently the ML-runtimes contain conda, which is needed for the answer given in the previous link.显然 ML 运行时包含 conda,这是上一个链接中给出的答案所必需的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM