someone to help in this please

196 views
Skip to first unread message

Peter Kirieny

unread,
Jun 16, 2020, 11:12:15 AM6/16/20
to django...@googlegroups.com
am using Geodjango with postgresql db and i get this error while trying to run the server;
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal204", "gdal203", "gdal202", "gdal201", "gdal20"). Is GDAL installed? If it i
s, try setting GDAL_LIBRARY_PATH in your settings.

the libraries are installed just don't know  how to set the paths
'am new in programming'

Budi Hermansyah

unread,
Jun 16, 2020, 11:15:56 AM6/16/20
to django...@googlegroups.com
Did you already install gdal n friends? 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL8t8eof1jY3wwUa9Fj_owAK8WEoVpZSFnOCFrQsmD_w3Yy%3Dfg%40mail.gmail.com.

Peter Kirieny

unread,
Jun 17, 2020, 8:05:38 AM6/17/20
to django...@googlegroups.com
yea, I installed it with OSGEO4W

Kasper Laudrup

unread,
Jun 17, 2020, 8:24:35 AM6/17/20
to django...@googlegroups.com
Hi Peter,

On 17/06/2020 14.04, Peter Kirieny wrote:
> yea, I installed it with OSGEO4W
>

So I assume you are on Windows?

It would have been quite useful if you had written that in your initial
question.

I'm not very experienced on that platform, but the installer you used
has most likely installed a library somewhere, I assume in "Program
Files" or whatever it's called on Windows these days.

Try to figure out where the installer put the GDAL library which is
probably a file ending with either ".lib" or ".dll" and set your
GDAL_LIBRARY_PATH to that folder in your settings.

Hope that helps.

Kind regards,

Kasper Laudrup

Richard Balwane

unread,
Jun 17, 2020, 9:09:08 AM6/17/20
to django...@googlegroups.com
-> Do a .whl installation - In the environment!
Download  "GDAL-3.0.4-cp37-cp37m-win_amd64.whl", if using Python 3.7 on Windows 64-bit
Say...
Command(env activated, path to the file): 
python.exe -m pip install "C:\\Users\\Mossad\\Downloads\\GDAL-3.0.4-cp37-cp37m-win_amd64.whl"

 ->  Include 'gdal300'  in env\Lib\site-packages\django\contrib\gis\gdal\libgdal.py file for this GDAL-3.0.4 .whl installation
(There is a list of these .dlls for nt users)
      Set: 
1. GDAL_LIBRARY_PATH in settings.py:
      import os
      GDAL_LIBRARY_PATH = os.path.join(
    PROJECT_DIR, r"env\\Lib\\site-packages\\osgeo\\gdal300.dll"
)

2.  GDAL_DRIVER_PATH = os.path.join(
    PROJECT_DIR, r"env\\Lib\site-packages\\osgeo\\gdalplugins\\ogr_FileGDB.dll"
)

And, you are good to go.

Praise be to The Almighty God.


Richard Dick Balwane
Mobiles:        +256 755 442248,
                        +256 781 493558.
Twiter:           @RBalwane
WhatsApp:   +256 755 442248

Balwane Holding Inc.




--

Peter Kirieny

unread,
Jun 17, 2020, 11:23:22 AM6/17/20
to django...@googlegroups.com
Thanks to all, let me try and hope you won't mind me coming back in case of anything
'AM NEW'

Peter Kirieny

unread,
Jun 17, 2020, 11:26:41 AM6/17/20
to django...@googlegroups.com
fortunately am in windows, once again thanks
I'll let you know the proceeds

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Peter Kirieny

unread,
Jun 18, 2020, 7:10:20 AM6/18/20
to django...@googlegroups.com
thanks again  Richard, this helped a lot

On Wed, 17 Jun 2020 at 16:07, Richard Balwane <richard...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages