我得到在Heroku以下錯誤:的Heroku/Django的:不能導入用戶定義GEOMETRY_BACKEND「GEOS」
django.core.exceptions.ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND "geos".
這很奇怪,因爲它是之前的工作。
我將buildpack設置爲https://github.com/dulaccc/heroku-buildpack-geodjango/。
在我的settings.py,我有:
GEOS_LIBRARY_PATH = environ.get('GEOS_LIBRARY_PATH')
GDAL_LIBRARY_PATH = environ.get('GDAL_LIBRARY_PATH')
當我部署到Heroku的,似乎在尋找GEOS。這裏的日誌:
-----> Checking for GEOS
Installed
GEOS installed and accessible with env variable 'GEOS_LIBRARY_PATH'
-----> Checking for Proj.4
Installed
Proj.4 installed and accessible with env variable 'PROJ4_LIBRARY_PATH'
-----> Checking for GDAL
Installed
GDAL installed and accessible with env variable 'GDAL_LIBRARY_PATH'
謝謝你的鏈接!另一天,我又救了我一個腦袋在牆上猛撲過來 – Neara