Git 推送 Heroku 被拒绝
Git push Heroku rejected
我想将我的 Flask 应用程序部署到 Heroku,但推送被拒绝了。
这是我的 requirements.txt,其中一些是我存储在本地的 whl 文件
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
...
这里是错误
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}
我也试过32位的whl文件,但是推送还是被拒绝了。
是因为它安装了旧版本的pip吗?如果是这样,我该如何更新 pip,因为似乎每次我尝试 git 推送时,它总是安装旧版本
[已解决]
我只需要从 requirements.txt 中删除 whl 文件,因为当它安装 osmnx 时它也会安装它的依赖项
我想将我的 Flask 应用程序部署到 Heroku,但推送被拒绝了。 这是我的 requirements.txt,其中一些是我存储在本地的 whl 文件
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
...
这里是错误
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}
我也试过32位的whl文件,但是推送还是被拒绝了。 是因为它安装了旧版本的pip吗?如果是这样,我该如何更新 pip,因为似乎每次我尝试 git 推送时,它总是安装旧版本
[已解决] 我只需要从 requirements.txt 中删除 whl 文件,因为当它安装 osmnx 时它也会安装它的依赖项