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?

xunilk
30.5k4 gold badges44 silver badges83 bronze badges
asked Sep 6, 2019 at 9:56

1 Answer 1

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.

answered Sep 6, 2019 at 22:36
1
  • I've installed Anaconda and chose executable file from Anaconda folder and it works! Thank you Chang. Commented Sep 11, 2019 at 14:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.