Saket Mittal
Saket Mittal

Reputation: 3906

need help install geoDjango on windows

i have no idea how to install GeoDjango i just follow tutorials from here (https://docs.djangoproject.com/en/1.8/ref/contrib/gis/install/#windows)

>>> from django.contrib.gis import gdal
>>> gdal.HAS_GDAL
False

PATH - C:\OSGeo4W64\apps\qgis\python\plugins\processing\algs\gdal

i have done some installation:

enter image description here

enter image description here

Modify Windows environment:

Success

Unsuccessful ( Error: Access is denied )

I really need GeoDjango installed Please everybody take a look and i will be grateful for your help. thanks in advance

Upvotes: 1

Views: 1322

Answers (4)

heather
heather

Reputation: 113

I got through all the set commands, but this command fails.....reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /f /d "%PATH%"

Upvotes: 0

Francis Odero
Francis Odero

Reputation: 151

download gdal.exe file (for python 2) then add path in your setting.py

e.g GDAL_LIBRARY_PATH='C:/Program Files (x86)/GDAL/gdal201.dll'

geodjango is django only that has geospatial database.

install django

pip install django==2.2.7

Upvotes: 0

For the first problem (HAS_GDAL = False), Python is not detecting GDAL installation because of Windows Environmental Variables are not set correctly.

I only could solve this problem giving up OSGeo4w and using GDAL and MapServer.

For the second problem (Error: Access is denied), you cannot add/edit registry because you are not using administrator. As Awe Oluwatobi said, click on Windows Key, write Command, right click on Command Prompt and select Run as Administrator. After this, run the same commands.

Upvotes: 0

Awe Oluwatobi
Awe Oluwatobi

Reputation: 29

Right click on command prompt and open as administrator. It will work

Upvotes: 2

Related Questions