我正在 Heroku 上部署 Django 应用程序,该应用程序已成功部署,但当我想在提供的 http 链接上查看该应用程序时,出现以下错误。gunicorn
在我的requirements.txt
file.
2020-02-21T16:22:09.021935+00:00 heroku[web.1]: State changed from crashed to starting
2020-02-21T16:22:18.635625+00:00 heroku[web.1]: Starting process with command `gunicorn brendan_project.wsgi -- log file-`
2020-02-21T16:22:20.734759+00:00 heroku[web.1]: Process exited with status 127
2020-02-21T16:22:20.679520+00:00 app[web.1]: bash: gunicorn: command not found
这是我的requirements.txt
file:
asgiref==3.2.3
astroid==2.3.3
certifi==2019.11.28
chardet==3.0.4
dj-database-url==0.5.0
Django==3.0.2
django-crispy-forms==1.8.1
django-fontawesome==1.0
django-heroku==0.3.1
django-mailjet==0.3.1
django-sendgrid==1.0.1
django-smtp-ssl==1.0
gunicorn==20.0.4
idna==2.8
isort==4.3.21
lazy-object-proxy==1.4.3
mailjet-rest==1.3.3
mccabe==0.6.1
psycopg2==2.8.4
pylint==2.4.4
pytz==2019.3
PyYAML==5.3
requests==2.22.0
six==1.14.0
sqlparse==0.3.0
typed-ast==1.4.1
urllib3==1.25.7
whitenoise==5.0.1
我也有Pipfile
and Pipfile.lock
files.
我也有Pipfile
and Pipfile.lock
files
这就是你的问题:你使用了两种不同的工具,但它们在一定程度上做着同样的事情。
如果你有一个Pipfile
and Pipfile.lock
,Heroku 使用Pipenv https://pipenv.readthedocs.io/en/latest/安装你的依赖项,以及你的requirements.txt
将被忽略。
在没有一个Pipfile
and Pipfile.lock
,Heroku 使用pip
安装依赖项requirements.txt
.
选择一个工具并在任何地方使用它。如果您选择 Pipenv,请确保所有依赖项都反映在您的Pipfile
and Pipfile.lock
(例如通过运行pipenv install -r requirements.txt
),删除你的requirements.txt
,并重新部署。如果你想使用pip
,摆脱你的Pipfile
and Pipfile.lock
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)