Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Module Named gdal #6

Open
matt-lethargic opened this issue Dec 7, 2022 · 4 comments
Open

No Module Named gdal #6

matt-lethargic opened this issue Dec 7, 2022 · 4 comments

Comments

@matt-lethargic
Copy link

matt-lethargic commented Dec 7, 2022

When running TouchTerrain_jupyter_starters_binder

I get to the section that says

# import packages
import os.path
from glob import glob
import k3d
from random import randint
from shutil import rmtree
import zipfile
from geojson import Polygon
import geemap
from touchterrain.common import TouchTerrainEarthEngine as TouchTerrain
from touchterrain.common.TouchTerrainGPX import *
args = TouchTerrain.initial_args # default args

and I get the error

ModuleNotFoundError                       Traceback (most recent call last)
File /TouchTerrain/standalone/touchterrain/common/TouchTerrainEarthEngine.py:52
     51 try:
---> 52     import gdal
     53 except ImportError as err:

ModuleNotFoundError: No module named 'gdal'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
File /usr/local/lib/python3.10/site-packages/osgeo/__init__.py:30, in swig_import_helper()
     29 try:
---> 30     return importlib.import_module(mname)
     31 except ImportError:

File /usr/local/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)
    125         level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)

File <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:1006, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:674, in _load_unlocked(spec)

File <frozen importlib._bootstrap>:571, in module_from_spec(spec)

File <frozen importlib._bootstrap_external>:1176, in create_module(self, spec)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

ImportError: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/local/lib/python3.10/site-packages/osgeo/../../.././libpng16.so.16)

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[5], line 10
      8 from geojson import Polygon
      9 import geemap
---> 10 from touchterrain.common import TouchTerrainEarthEngine as TouchTerrain
     11 from touchterrain.common.TouchTerrainGPX import *
     12 args = TouchTerrain.initial_args # default args

File /TouchTerrain/standalone/touchterrain/common/TouchTerrainEarthEngine.py:54
     52     import gdal
     53 except ImportError as err:
---> 54     from osgeo import gdal
     56 import time
     57 import random

File /usr/local/lib/python3.10/site-packages/osgeo/__init__.py:46
     42                 raise ImportError(traceback_string + '\n' + msg)
     43         return importlib.import_module('_gdal')
---> 46 _gdal = swig_import_helper()
     47 del swig_import_helper
     49 __version__ = _gdal.__version__ = _gdal.VersionInfo("RELEASE_NAME")

File /usr/local/lib/python3.10/site-packages/osgeo/__init__.py:43, in swig_import_helper()
     41         traceback_string = ''.join(traceback.format_exception(*sys.exc_info()))
     42         raise ImportError(traceback_string + '\n' + msg)
---> 43 return importlib.import_module('_gdal')

File /usr/local/lib/python3.10/importlib/__init__.py:126, in import_module(name, package)
    124             break
    125         level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)

ModuleNotFoundError: No module named '_gdal'

Sorry for another bug, I'm just trying to get things working locally :-(

@ChHarding
Copy link
Owner

ChHarding commented Dec 7, 2022 via email

@matt-lethargic
Copy link
Author

Any luck rebuilding the image, I noticed that it wasn't updated on docker hub yet

@ChHarding
Copy link
Owner

ChHarding commented Dec 8, 2022 via email

@ChHarding
Copy link
Owner

ChHarding commented Dec 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants