微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

推送拒绝Heroku Python Flask要求失败,但exiv2 == 0.3.1

如何解决推送拒绝Heroku Python Flask要求失败,但exiv2 == 0.3.1

我正尝试将我的烧瓶应用程序推送到heroku进行托管。一切顺利,直到推送到heroku。我在remote:Building source: 期间收到错误,无法满足exiv2 == 0.3.1的要求。 exiv2==0.3.1我了解,根据我一直在阅读的内容,需求部分通常是发生错误的地方。但是,除了删除exiv2依赖代码并丢失某些功能外,我不确定如何继续进行操作... ???

requirements.txt

altgraph==0.17
asgiref==3.2.10
blinker==1.4
blurhash==1.1.4
boost==0.1
certifi==2020.6.20
chardet==3.0.4
click==7.1.2
cmake==3.17.3
cycler==0.10.0
decorator==4.4.2
dlib==19.20.0
dnspython==2.0.0
docutils==0.16
email-validator==1.1.1
exiv2==0.3.1  <-------------------(ITS here format/version is correct)
face-recognition==1.3.0
face-recognition-models==0.3.0
Flask==1.1.2
Flask-Cors==3.0.8
Flask-Mail==0.9.1
Flask-WTF==0.14.3
future==0.18.2
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.2
joblib==0.16.0
Kivy==1.11.1
kivy-deps.angle==0.2.0
kivy-deps.glew==0.2.0
kivy-deps.sdl2==0.2.0
Kivy-Garden==0.1.4
kiwisolver==1.2.0
MarkupSafe==1.1.1
Mastodon.py==1.5.1
matplotlib==3.3.1
numpy==1.19.0
opencv-python==4.3.0.36
pefile==2019.4.18
piexif==1.1.3
Pillow==7.2.0
pyexiv2==2.3.1
Pygments==2.6.1
PyInstaller==3.6
pyparsing==2.4.7
python-dateutil==2.8.1
python-magic==0.4.18
pytz==2020.1
pywin32-ctypes==0.2.0
requests==2.24.0
scikit-learn==0.23.1
scipy==1.5.1
self==0.0.0
six==1.15.0
sqlAlchemy==1.3.18
sqlparse==0.3.1
threadpoolctl==2.1.0
train==0.0.5
urllib3==1.25.9
Werkzeug==1.0.1
WTForms==2.3.3

控制台错误

C:\Flask>git push heroku master
Enumerating objects: 17065,done.
Counting objects: 100% (17065/17065),done.
Delta compression using up to 8 threads
Compressing objects: 100% (13088/13088),done.
Writing objects: 100% (17065/17065),251.56 MiB | 140.00 KiB/s,done.
Total 17065 (delta 3593),reused 17065 (delta 3593)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.12
remote: -----> Installing pip 20.1.1,setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing sqlite3
remote: -----> Installing requirements with pip
remote:        Collecting altgraph==0.17
remote:          Downloading altgraph-0.17-py2.py3-none-any.whl (21 kB)
remote:        Collecting asgiref==3.2.10
remote:          Downloading asgiref-3.2.10-py3-none-any.whl (19 kB)
remote:        Collecting blinker==1.4
remote:          Downloading blinker-1.4.tar.gz (111 kB)
remote:        Collecting blurhash==1.1.4
remote:          Downloading blurhash-1.1.4-py2.py3-none-any.whl (5.3 kB)
remote:        Collecting boost==0.1
remote:          Downloading boost-0.1.tar.gz (6.3 kB)
remote:        Collecting certifi==2020.6.20
remote:          Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
remote:        Collecting chardet==3.0.4
remote:          Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
remote:        Collecting click==7.1.2
remote:          Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
remote:        Collecting cmake==3.17.3
remote:          Downloading cmake-3.17.3-py3-none-manylinux1_x86_64.whl (17.6 MB)
remote:        Collecting cycler==0.10.0
remote:          Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
remote:        Collecting decorator==4.4.2
remote:          Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
remote:        Collecting dlib==19.20.0
remote:          Downloading dlib-19.20.0.tar.gz (3.2 MB)
remote:        Collecting dnspython==2.0.0
remote:          Downloading dnspython-2.0.0-py3-none-any.whl (208 kB)
remote:        Collecting docutils==0.16
remote:          Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
remote:        Collecting email-validator==1.1.1
remote:          Downloading email_validator-1.1.1-py2.py3-none-any.whl (17 kB)
remote:        ERROR: Could not find a version that satisfies the requirement exiv2==0.3.1 (from -r /tmp/build_92ba74db/requirements.txt (line 16)) (from versions: none)
remote:        ERROR: No matching distribution found for exiv2==0.3.1 (from -r /tmp/build_92ba74db/requirements.txt (line 16))
remote:  !     Push rejected,Failed to compile Python app.
remote:
remote:  !     Push Failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to faces-application.
remote:
To https://git.heroku.com/faces-application.git
 ! [remote rejected]   master -> master (pre-receive hook declined)
error: Failed to push some refs to 'https://git.heroku.com/faces-application.git'

解决方法

exiv2 仅在Windows上有效,而Heroku运行Linux。

您需要完全更换它。尝试exif

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。