gpt4 book ai didi

Python-Heroku - aiohttp 3.7.3 要求 chardet<4.0,>=2.0,但您将拥有不兼容的 chardet 4.0.0

转载 作者:行者123 更新时间:2023-12-04 15:07:00 25 4
gpt4 key购买 nike

我刚开始使用 git 和 heroku,我想让我的文件在 heroku 上全天候 24/7 在线,但是在将文件上传到 heroku(git push heroku master) 时出现了这种情况

aiohttp 3.7.3 has requirement chardet<4.0,>=2.0, but you'll have chardet 4.0.0 which is incompatible.

我真的认为这是一个 python 版本问题,所以当我尝试使用 runtime.txt 并将 python 版本设置为支持版本之一时 https://devcenter.heroku.com/articles/python-support#supported-runtimes此页面,仍然无法正常显示

Requested runtime (python=3.7.9) is not available for this stack (heroku-20).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support

我是第一次使用 git,所以不是很熟悉。我只在一个叫做 master 的分支上工作我先打字

git add .

然后

git commit -am "tej"

然后

git push heroku master

不,我不是在使用 github 存储库。

最佳答案

我有同样的问题,但通过在 requirements.txt 中将 chardet 的版本指定为 3.0.4 来设法解决它

chardet==3.0.4

然后简单地运行

pip install -r requirements.txt

一切都会好起来的。


请注意,如果您在 requirements.txt 中使用以下版本的 chardet,您也会遇到该错误

chardet==4.0.0

enter image description here

关于Python-Heroku - aiohttp 3.7.3 要求 chardet<4.0,>=2.0,但您将拥有不兼容的 chardet 4.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65937642/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com