#Django deploy on PostGIS failing on GDAL install

4 messages · Page 1 of 1 (latest)

light robin
#

I am trying to deploy a Django GIS app which works correctly on my local machine and also on Railway without the GIS components included. However it fails on the Railway PostGIS deploy at the point of the pip GDAL install with the message:-

FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'

For my local deploy on Windows, I have the following included in Django's settings.py but am not aware of the need for a similar path for a Railway production deploy.

GDAL_LIBRARY_PATH = r'C:\OSGeo4W64\bin\gdal204'

I have configured the postgres database with the postGIS extension as per https://docs.railway.app/databases/postgresql

Relevant lines from requirements.txt are:-

django==3.2.7 GDAL geopandas==0.9.0

Am I missing an environment variable or something ?

Railway Docs

Documentation for Railway

fair blazeBOT
#

Project ID: N/A

#

It is likely that you need to set an environment variable for GDAL_LIBRARY_PATH in order to deploy your Django GIS app on Railway.

light robin
#

Project id: Reflib