DOI-USGS / knoten

Python Geospatial Sensor Exploitation Library
Other
3 stars 21 forks source link

Importing from gdal in knoten #88

Closed oleg-alexandrov closed 2 years ago

oleg-alexandrov commented 3 years ago

I am having issues with the line: https://github.com/USGS-Astrogeology/knoten/blob/master/knoten/csm.py#L7

which says:

from gdal import ogr

This can be reproduced on the command line, by installing the knoten dependencies, then running python as:

~/miniconda3/envs/knoten/bin/python

and then running: from gdal import ogr

It says:

ModuleNotFoundError: No module named 'gdal'

What works is to say:

from osgeo import ogr

This is on Linux. What I have installed with miniconda in the knoten environment is:

gdal 3.2.2 py37hc5bc4e4_0 conda-forge libgdal 3.2.2 h804b7da_0 conda-forge

jessemapel commented 3 years ago

Looks like a bug from the old version of GDAL we had been using

jlaura commented 3 years ago

93 addresses the import issue.

jlaura commented 2 years ago

It looks like #93 fixed this, but we never release an updated version (I think?). Working on autocnet docs and I am seeing knoten 0.2.1 pulled with the broken imports.

I can pull a release if others are seeing something similar (e.g., it isn't just a weird caching issue on my side.)