Skip to content

Instantly share code, notes, and snippets.

@nonZero
Created November 25, 2015 15:42
Show Gist options
  • Save nonZero/1615aa7047213d8d98f3 to your computer and use it in GitHub Desktop.
Save nonZero/1615aa7047213d8d98f3 to your computer and use it in GitHub Desktop.
Enable GeoDjango on windows
import os
# ......
if os.name == 'nt':
OSGEO4W = r"C:\OSGeo4W"
os.environ['OSGEO4W_ROOT'] = OSGEO4W
os.environ['GDAL_DATA'] = OSGEO4W + r"\share\gdal"
os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj"
os.environ['PATH'] = OSGEO4W + r"\bin;" + os.environ['PATH']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment