Heroku 错误:filename.whl 在此平台上不受支持

时间:2021-01-08 13:46:28

标签: django heroku gdal

我知道这个问题已经发布了很多次,但我在为我的 Django 项目部署 Heroku 期间遇到了这个错误。我已将 GDAL-3.1.4-cp38-cp38-win_amd64.whl 放在项目的根目录中。 .whl 文件在本地安装成功,但在部署期间上述错误仍然存​​在。 GDAL_LIBRARY_PATH 设置为:

GDAL_LIBRARY_PATH = 'env/Lib/site-packages/osgeo/gdal301.dll'
GEOS_LIBRARY_PATH = 'env/Lib/site-packages/osgeo/geos_c.dll'

当我尝试时:

git push heroku master

我收到以下错误:

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' 

我的 requirements.txt 文件看起来像这样。 gdal 文件的包含方式有问题吗?:

django-map-widgets==0.3.0
GDAL @ file:///D:/<project_root>/GDAL-3.1.4-cp38-cp38-win_amd64.whl

Python 版本:

Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32

请指出这里可能有什么问题,因为我已经被困了好几天了。

0 个答案:

没有答案