Windows GDAL Installation in Python Django Project
First Download the gdal wheel from
here https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
now pip install the gdal in env jus like normally
also install psycopg2 and pscopg2-binary
add postgres database to the settings
if the liberror then add the version in django contrib gis gdal libgdal.py add to lib_name
get the verison of dll from sitescrips osgeo,
add the path into ypur settings
import os
if os.name == 'nt':
VENV_BASE = os.environ['VIRTUAL_ENV']
os.environ['PATH'] = os.path.join(VENV_BASE, 'Lib\\site-packages\\osgeo') + ';' + os.environ['PATH']
os.environ['PROJ_LIB'] = os.path.join(VENV_BASE, 'Lib\\site-packages\\osgeo\\data\\proj') + ';' + os.environ['PATH']
Comments
Post a Comment