admin管理员组

文章数量:1323323

i have a geodjango project with python 13 and windows 11 i have install qgis software also

in my project settings for gdal path i have

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    "django.contrib.gis",
    "world",
]

GDAL_LIBRARY_PATH = r'C:\Program Files\QGIS 3.34.14\bin\gdal309.dll'

GEOS_LIBRARY_PATH = r'C:\Program Files\QGIS 3.34.14\bin\geos_c.dll'

DATABASES = {
    "default": {
       'ENGINE': 'django.contrib.gis.db.backends.postgis',
        'NAME': 'dbname',
        'USER': 'user',
        'PASSWORD': 'password',
        'HOST': '127.0.0.1',  
        'PORT': '5432',  
        'CONN_MAX_AGE': 0,
    },
}

The project runs in vscode but not with pycharm

it returns error

oserror(22, The specified procedure could not be found)
<CDLL 'C:\Program Files\QGIS 3.34.14\bin\gdal309.dll', handle 0 at 0x1cabd1bd570>

本文标签: djangoPycharm with gdal library on windows 11Stack Overflow