When running paver setup attempting to configure Geonode (Windows 10-64bit, Python 39), I get a raise of django being improperly configured. The computer suggests that if I have installed GDAL successfully then I should try setting GDAL_LIBRARY_PATH in my settings. I have successfully installed gdal via pip install GDAL-3.3.1-cp39-cp39-win_amd64.whl.
The settings for the geonode project are as follows (C:\Users\amell\Documents\geonode\geonode):
if os.name == 'nt':
import platform
OSGEO4W = r"C:\OSGeo4W"
if '64' in platform.architecture()[0]:
OSGEO4W += "64"
assert os.path.isdir(OSGEO4W), "Directory does not exist: " + 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']
I then added the below code to the above and still get the same issue:
GDAL_LIBRARY_PATH = r'C:\OSGeo4W64\bin\gdal301.dll'
I have in addition checked the lib names to see if the GDAL version I installed (331) is listed (C:\Users\amell\Documents\geonode_env\Lib\site-packages\django\contrib\gis\gdal\libgdal). Strangely, the .dll in C:\OSGeo4W64\bin is 301 and not 331 (others suggested renaming this which failed), though I installed 331 via pip using the .whl file. I am currently not sure what the problem is, I tried possible solutions suggested by those with the same issue and they do not seem to work for my case. Perhaps I am missing something.