Search code examples
pythonherokugdal

Git push Heroku rejected


I want to deploy my flask app to Heroku but the push rejected. Here is my requirements.txt, some of them are whl file which I store it locally

attrs==20.3.0
branca==0.4.2
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
click-plugins==1.1.1
cligj==0.7.1
cycler==0.10.0
DateTime==4.3
decorator==4.4.2
descartes==1.1.0
GDAL @ file:///C:/Users/path/to/GDAL-3.2.2-cp39-cp39-win_amd64.whl
Fiona @ file:///C:/Users/path/to/Fiona-1.8.19-cp39-cp39-win_amd64.whl
Shapely @ file:///C:/Users/path/to/Shapely-1.7.1-cp39-cp39-win_amd64.whl
Flask==1.1.2
folium==0.12.1
geopandas==0.9.0
gunicorn==20.1.0
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.3
joblib==1.0.1
kiwisolver==1.3.1
MarkupSafe==1.1.1
matplotlib==3.4.1
munch==2.5.0
networkx==2.5.1
numpy==1.20.2
osmnx==1.0.1
...

here are the error

remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the buildpack default: python-3.9.4
remote:        To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.9.4
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        ERROR: GDAL-3.2.2-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to {my-app-name}

I have also tried the 32 bit for the whl file but the push still rejected. Is it because it installs the older version of pip? If so, how can I update pip because it seems that every time I try git push, it always install the older version


Solution

  • [SOLVED] I just need to delete the whl file from the requirements.txt, because when it install osmnx it also install its dependencies