Hy!
I started my first Geodjango web application, For Geodjango Gdal in the important library. I am trying to install using official documentation but it’s not working. don’t no
Hi,
Try to read again your post, and imagine how anyone could help you with the information you gave
So try to reformulate so we can imagine what your issue is.
Note that on Debian/Ubuntu systems, this page mentions the packages you have to install on your system.
(env) (base) usman@usman-Lenovo-B50-70:~/Desktop/projects/geodjango$ python manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File “/home/usman/anaconda3/lib/python3.11/threading.py”, line 1038, in _bootstrap_inner
self.run()
File “/home/usman/anaconda3/lib/python3.11/threading.py”, line 975, in run
self._target(*self._args, **self._kwargs)
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/utils/autoreload.py”, line 64, in wrapper
fn(*args, **kwargs)
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/core/management/commands/runserver.py”, line 126, in inner_run
autoreload.raise_last_exception()
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/utils/autoreload.py”, line 87, in raise_last_exception
raise _exception[1]
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/core/management/init.py”, line 394, in execute
autoreload.check_errors(django.setup)()
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/utils/autoreload.py”, line 64, in wrapper
fn(*args, **kwargs)
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/apps/registry.py”, line 116, in populate
app_config.import_models()
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/apps/config.py”, line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/usman/anaconda3/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1147, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/auth/models.py”, line 5, in
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/auth/base_user.py”, line 40, in
class AbstractBaseUser(models.Model):
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/db/models/base.py”, line 143, in new
new_class.add_to_class(“_meta”, Options(meta, app_label))
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/db/models/base.py”, line 371, in add_to_class
value.contribute_to_class(cls, name)
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/db/models/options.py”, line 231, in contribute_to_class
self.db_table, connection.ops.max_name_length()
^^^^^^^^^^^^^^
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/utils/connection.py”, line 15, in getattr
return getattr(self._connections[self._alias], item)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/utils/connection.py”, line 62, in getitem
conn = self.create_connection(alias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/db/utils.py”, line 193, in create_connection
backend = load_backend(db[“ENGINE”])
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/db/utils.py”, line 113, in load_backend
return import_module(“%s.base” % backend_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/usman/anaconda3/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/db/backends/postgis/base.py”, line 16, in
from .adapter import PostGISAdapter
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/db/backends/postgis/adapter.py”, line 6, in
from django.contrib.gis.geos import GEOSGeometry
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/geos/init.py”, line 6, in
from .collections import ( # NOQA
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/geos/collections.py”, line 7, in
from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/geos/geometry.py”, line 9, in
from django.contrib.gis import gdal
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/gdal/init.py”, line 29, in
from django.contrib.gis.gdal.datasource import DataSource
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/gdal/datasource.py”, line 40, in
from django.contrib.gis.gdal.driver import Driver
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/gdal/driver.py”, line 5, in
from django.contrib.gis.gdal.prototypes import ds as capi
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/gdal/prototypes/ds.py”, line 10, in
from django.contrib.gis.gdal.libgdal import lgdal
File “/home/usman/Desktop/projects/env/lib/python3.11/site-packages/django/contrib/gis/gdal/libgdal.py”, line 69, in
lgdal = CDLL(lib_path)
^^^^^^^^^^^^^^
File “/home/usman/anaconda3/lib/python3.11/ctypes/init.py”, line 376, in init
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /home/usman/anaconda3/bin/…/lib/libstdc++.so.6: version `GLIBCXX_3.4.30’ not found (required by /lib/x86_64-linux-gnu/libgdal.so.32)
That’s better now!
It looks like a conflict between the anaconda-base Python install and the system-installed GDAL. I’m sorry, I’m not a user of conda/anaconda, so hopefully someone else may have a hint about a possible resolution.