1đ
Installed GDAL from Christopher Gohlkeâs site (32 bit GDAL-2.0.3-cp35-cp35m-win32.whl)into the virtual environment.
Download OSGEO4W (32 bit) and install the Express Web option.
Create Environment Variables. Set the environment variables as below:
set PYTHON_ROOT=C:\Python35-32 set GDAL_DATA=C:\Program
Files\PostgreSQL\9.6\gdal-data set PROJ_LIB=C:\Program
Files\PostgreSQL\9.6\share\contrib\postgis\proj set
PATH=%PATH%;%PYTHON_ROOT%;%OSGEO4W_ROOT%\bin reg ADD
âHKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environmentâ /v
Path /t REG_EXPAND_SZ /f /d â%PATH%â reg ADD
âHKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environmentâ /v
GDAL_DATA /t REG_EXPAND_SZ /f /d â%GDAL_DATA%â reg ADD
âHKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environmentâ /v
PROJ_LIB /t REG_EXPAND_SZ /f /d â%PROJ_LIB%â
I also set LD_LIBRARY_PATH as C:\Python35-32\myvenv_python3\Lib\site-packages\osgeo.
Then, the database is Improperly configured and cannot import âGDALRasterâ went away.From your django project directory, it would be possible to migrate now using: python manage.py migrate