1

I have some troubles with GDAL module on Python. When I try to import gdal, console displays this:

Файл "c:/rstp/Lib/site-packages/osgeo/__init__.py", строка 48, из <module>    __version__ = _gdal.__version__ = _gdal.VersionInfo("RELEASE_NAME")
builtins.AttributeError: 'NoneType' object has no attribute 'VersionInfo'

or this with completely English translation:

File "c: / rstp / Lib / site-packages / osgeo / __ init__.py", line 48, from <module> __version__ = _gdal .__ version__ = _gdal.VersionInfo ("RELEASE_NAME")
builtins.AttributeError: 'NoneType' object has no attribute 'VersionInfo'

Then Wing moves to osgeo/__init.py file, where highlights this line:

__version__ = _gdal.__version__ = _gdal.VersionInfo("RELEASE_NAME")

Win10, Python version 3.7.4, GDAL 3.0.1

Can you help me please?

0

Python has really complex path configuration and it may not recognize the GDAL package even you have installed it. You may need to find out whether gdal is under the Python path or not. I generally prefer to use Conda, and let Conda environment to take care of all the path problem. Basically you create an environment, and then install gdal for this environment. Then when you run python using this environment.

  • I've installed Anaconda and chose executable file from Anaconda folder and it works! Thank you Chang. – Ivan Novichikhin Sep 11 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.