[英]when i am trying to deploy my django project on heroku server these errors are showing so please give any ans
ERROR: Command errored out with exit status 1错误:命令出错,退出状态为 1
ERROR: "Failed building wheel for backports.zoneinfo",错误:“backports.zoneinfo 的构建轮失败”,
ERROR: "Could not build wheels for backports.zoneinfo",错误:“无法为 backports.zoneinfo 构建轮子”,
which is required to install pyproject.toml-based projects Push rejected, failed to compile Python app.需要安装基于 pyproject.toml 的项目 Push rejected, failed to compile Python app。
: [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https.//git.heroku.com/image456.git' : [remote rejected] master -> master (pre-receive hook declined) 错误:无法将一些引用推送到“https.//git.heroku.com/image456.git”
I'd say create a runtime.txt file in the root folder, and in the file, change the python version because it's the problem of Heroku. Python 3.10.3 has lots of bugs, so I'd suggest switching to Python 3.8.我会说在根文件夹中创建一个runtime.txt文件,并在文件中更改 python 版本,因为它是 Heroku 的问题。Python 3.10.3 有很多错误,所以我建议切换到 Python 3.8。 To do so, create a runtime.txt file, then in it, write python-3.8.13 without any spaces.为此,创建一个runtime.txt文件,然后在其中写入不带任何空格的 python-3.8.13 。 Then delete and redo 'git init', 'git add.'然后删除并重做“git init”、“git add”。 and the stuff that you previously did before the 'git push heroku master'.以及您之前在“git push heroku master”之前所做的事情。 I had the same problem myself, and I did exactly that (I was using Python 3.8).我自己也遇到了同样的问题,我就是这么做的(我使用的是 Python 3.8)。
If you don't like Python 3.8.13, there's Python 3.7.13, and 3.9.11.如果您不喜欢 Python 3.8.13,可以选择 Python 3.7.13 和 3.9.11。 The format for them are python-3.7.13 python-3.9.11它们的格式是python-3.7.13 python-3.9.11
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.