<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GDAL on Databricks Cluster Runtime 12.2 LTS in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40896#M765</link>
    <description>&lt;P&gt;Hi, I think I understood the issue, for the no module found error sometimes you need to clean the apt list , something like below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;%sh&lt;BR /&gt;rm -r /var/cache/apt/archives/* /var/lib/apt/lists/*&lt;BR /&gt;sudo apt-get clean&lt;BR /&gt;sudo apt-get update&lt;BR /&gt;sudo add-apt-repository -y ppa:ubuntugis/ppa &amp;amp;&amp;amp; apt-get update&lt;BR /&gt;sudo apt-get install -y gdal-bin libgdal-dev (or&amp;nbsp;gdal*)&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 06:52:31 GMT</pubDate>
    <dc:creator>Debayan</dc:creator>
    <dc:date>2023-08-22T06:52:31Z</dc:date>
    <item>
      <title>GDAL on Databricks Cluster Runtime 12.2 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/39091#M662</link>
      <description>&lt;P&gt;I need gdal in my course work.&lt;/P&gt;&lt;P&gt;After reading this &lt;A href="https://www.databricks.com/notebooks/rasterframes-notebook.html" target="_self"&gt;post&lt;/A&gt;, I used init script as follows to install gdal into runtime 12.2 LTS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dbutils.fs.put("/databricks/scripts/gdal_install.sh","""
#!/bin/bash
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install -y cmake gdal-bin libgdal-dev python3-gdal""",
True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The init script ran and cluster could start properly but when i run import gdal in notebook, i get the following error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN class=""&gt;ModuleNotFoundError: No module named 'gdal'&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I also tried installing gdal into the cluster via Maven repository, it does not work either.&lt;/P&gt;&lt;P&gt;May I know what I can do to get gdal installed properly?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 10:01:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/39091#M662</guid>
      <dc:creator>NC</dc:creator>
      <dc:date>2023-08-04T10:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: GDAL on Databricks Cluster Runtime 12.2 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40748#M756</link>
      <description>&lt;P&gt;Hi, Could you please confirm if apt get install gdal was already tried?&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try as below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;apt-get update &amp;amp;&amp;amp; apt-get upgrade; apt-get install gdal*;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please tag&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.databricks.com/t5/user/viewprofilepage/user-id/26078" target="_blank"&gt;@Debayan&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;with your next comment, which will get me notified. Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 07:36:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40748#M756</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-08-21T07:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: GDAL on Databricks Cluster Runtime 12.2 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40794#M760</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/26078"&gt;@Debayan&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean this:?&lt;/P&gt;&lt;PRE&gt;dbutils.fs.put("/databricks/scripts/gdal_install.sh","""
#!/bin/bash
&lt;SPAN&gt;apt-get update &amp;amp;&amp;amp; apt-get upgrade&lt;BR /&gt;apt-get install gdal*&lt;/SPAN&gt;&lt;BR /&gt;""",
True)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 14:26:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40794#M760</guid>
      <dc:creator>NC</dc:creator>
      <dc:date>2023-08-21T14:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: GDAL on Databricks Cluster Runtime 12.2 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40896#M765</link>
      <description>&lt;P&gt;Hi, I think I understood the issue, for the no module found error sometimes you need to clean the apt list , something like below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;%sh&lt;BR /&gt;rm -r /var/cache/apt/archives/* /var/lib/apt/lists/*&lt;BR /&gt;sudo apt-get clean&lt;BR /&gt;sudo apt-get update&lt;BR /&gt;sudo add-apt-repository -y ppa:ubuntugis/ppa &amp;amp;&amp;amp; apt-get update&lt;BR /&gt;sudo apt-get install -y gdal-bin libgdal-dev (or&amp;nbsp;gdal*)&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 06:52:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/40896#M765</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2023-08-22T06:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: GDAL on Databricks Cluster Runtime 12.2 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/97240#M4541</link>
      <description>&lt;P&gt;Hi, in case anyone is still struggling here. I found I could not get the init script approach to work, but if I just run a shell command to install gdal at the start of my notebook it works fine. You might note, however, that this installs gdal version 3.4.1 which is a bit dated (&lt;SPAN&gt;Jan 4, 2022)&lt;/SPAN&gt;. My understanding is that this is because "the&amp;nbsp;&lt;SPAN&gt;Databricks standard image is itself based on Ubuntu 18.04 and GDAL 2.2.3 is the latest version available on this distribution" - see this &lt;A href="https://medium.com/os-techblog/installing-gdal-onto-a-databricks-cluster-f25b98605d2a" target="_self"&gt;Medium article&lt;/A&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%sh
sudo apt-get install -y cmake gdal-bin libgdal-dev python3-gdal&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%python
from osgeo import gdal
gdal.__version__&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 16:47:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/gdal-on-databricks-cluster-runtime-12-2-lts/m-p/97240#M4541</guid>
      <dc:creator>Matt_C</dc:creator>
      <dc:date>2024-11-01T16:47:17Z</dc:date>
    </item>
  </channel>
</rss>

