Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 09:44 AM - edited 11-01-2024 09:47 AM
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 (Jan 4, 2022). My understanding is that this is because "the 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 Medium article.
%sh
sudo apt-get install -y cmake gdal-bin libgdal-dev python3-gdal
%python
from osgeo import gdal
gdal.__version__