我正在尝试在Heroku上部署CMS应用程序。但是当我尝试
git push heroku master
我遇到以下错误。
Counting objects: 2841, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2775/2775), done.
Writing objects: 100% (2841/2841), 13.35 MiB | 497.00 KiB/s, done.
Total 2841 (delta 917), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.6
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1))
remote: Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1)) (from versions: )
remote: No matching distribution found for pkg-resources==0.0.0 (from -r /tmp/build_2e9a3f2d21d5a1b3c5ab348811182510/requirements.txt (line 1))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to peaceful-olympic-84671.
remote:
To https://git.heroku.com/peaceful-olympic-84671.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/peaceful-olympic-84671.git'
我已经在堆栈溢出时看到了很多相同问题的答案,但是没有一个答案对我有用。请帮忙。
更新:从pkg-resources
中删除requirements.txt
很有帮助。但是没有显示该应用程序。它显示应用程序错误,请检查日志以获取详细信息。
这是我在Heroku中的日志文件。
2018-07-04T13:19:20.003057+00:00 heroku[web.1]: Starting process with command `gunicorn zoomtail.wsgi --log-file -`
2018-07-04T13:19:22.351320+00:00 heroku[web.1]: State changed from starting to crashed
2018-07-04T13:19:22.264506+00:00 app[web.1]: bash: gunicorn: command not found
2018-07-04T13:19:22.329998+00:00 heroku[web.1]: Process exited with status 127
2018-07-04T15:49:08.058951+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=b22e6349-7456-4bfe-bb40-7be7b285e027 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:08.609553+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=cb458cf7-fd71-4342-a3be-e46f258b6072 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:44.078076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=a3d03045-0204-44e4-9739-afeaa95eb1d0 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:49:45.057346+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=dde12264-b1a6-4394-8427-4f431a292a6c fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:52:41.870237+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=peaceful-olympic-84671.herokuapp.com request_id=95caff68-1fc2-4767-a835-e3e51fb867a8 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
2018-07-04T15:52:42.608603+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=peaceful-olympic-84671.herokuapp.com request_id=7b5ad55a-8c59-4c92-8480-a9ed11572306 fwd="106.206.63.203" dyno= connect= service= status=503 bytes= protocol=https
我无法理解错误。请帮忙。
答案 0 :(得分:0)
在推送到heroku之前,从requirements.txt
中删除以下行。
pkg-resources==0.0.0