heroku-clidjango-deploymentdeploying

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

ERROR: "Failed building wheel for backports.zoneinfo",

ERROR: "Could not build wheels for backports.zoneinfo",

which is required to install pyproject.toml-based projects 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'


Solution

  • 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. To do so, create a runtime.txt file, then in it, write python-3.8.13 without any spaces. Then delete and redo 'git init', 'git add .' and the stuff that you previously did before the 'git push heroku master'. I had the same problem myself, and I did exactly that (I was using Python 3.8).

    If you don't like Python 3.8.13, there's Python 3.7.13, and 3.9.11. The format for them are python-3.7.13 python-3.9.11