I know this question has been posted many a time, but I am facing this error during Heroku Deployment for my Django Project. I have placed GDAL-3.1.4-cp38-cp38-win_amd64.whl in the root directory of the project. The .whl file installs successfully locally, but the mentioned error still persists during deployment. The GDAL_LIBRARY_PATH is set as:
GDAL_LIBRARY_PATH = 'env/Lib/site-packages/osgeo/gdal301.dll'
GEOS_LIBRARY_PATH = 'env/Lib/site-packages/osgeo/geos_c.dll'
When I try:
git push heroku master
I get the following error:
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 4 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 24.68 MiB | 1.57 MiB/s, done.
Total 10 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! Python has released a security update! Please consider upgrading to python-3.8.7
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Requirements file has been changed, clearing
cached dependencies
remote: -----> Installing python-3.8.2
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and
wheel 0.34.2
remote: ERROR: GDAL-3.1.4-cp38-cp38-win_amd64.whl is
not a supported wheel on this platform. #This is the error
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to desksolutions.
remote:
To https://git.heroku.com/desksolutions.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/desksolutions.git'
My requirements.txt file looks like this. Is there a problem with how gdal file is included?:
django-map-widgets==0.3.0
GDAL @ file:///D:/<project_root>/GDAL-3.1.4-cp38-cp38-win_amd64.whl
Python version:
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Please enlighten what could be the problem here as I am stuck for days now.