Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdal installed but not working in Jupyter Notebook

I installed gdal using conda install -c conda-forge gdal in my Jupyter terminal, but when I run the following code:

import gdal
gdal.Open('/Users/alyse/ldem.img') 
gdal.Translate('/Users/alyse/ldem.img')
mpimg.read('/Users/alyse/ldem.img')

I get the following error: ModuleNotFoundError: No module named 'gdal'.
welp. If anyone has any advice I would very much appreciate! I am a coding beginner.

like image 549
alyse Avatar asked Sep 03 '25 07:09

alyse


1 Answers

Try this: from osgeo import gdal, it worked for me.

like image 144
losted Avatar answered Sep 04 '25 19:09

losted