I've installed GDAL
from the wheel files available here on Python 3.4. I'm using an old version of Python because one of the packages I need doesn't work yet on Python 3.6.
When I try to import gdal in Python with a simple from osgeo import gdal
, I get the following error:
Traceback (most recent call last):
File "", line 1, in
File "C:\Python34\lib\site-packages\osgeo\__init__.py", line 41, in
_gdal = swig_import_helper()
File "C:\Python34\lib\site-packages\osgeo\__init__.py", line 37, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
File "C:\Python34\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: DLL load failed with error code -1073741795
I'm not sure this question is a duplicate of this question which suggests to install the pre-compiled GDAL from GIS internals.
Answer
This issue was solved by sticking with the version 3.6.5
(latest as of this answer) of Python. It turns out that I didn't have to downgrade to Python 3.4 since all the libraries I was using are compatible with Python 3.6.
No comments:
Post a Comment