Trevirius Trevirius - 9 months ago 125
Python Question

Django migration can't find GDALRaster

I took over a project with Django, Django REST framework and Leaflet to store drawn path in a database. Installing Django in an

and trying to migrate it raises:

File "D:\SHK\ElektroClean\venv\lib\site-packages\django\contrib\gis\db\backends\postgis\", line 7, in
from django.contrib.gis.gdal import GDALRaster
ImportError: cannot import name 'GDALRaster'

In the directory
is a folder called raster. Is renaiming this folder to GDALRaster the fix?

Anyone suggestions to fix this?

Answer Source

solved did mistakes on installing GDAL -.-

sudo apt-get install libgdal-dev
pip install gdal