推送到 heroku 时出现问题,应用程序不兼容且远程被拒绝



所以我是heroku的新手,并试图将我的项目推向heroku。起初我遇到了类似的错误,然后我创建了一个临时分支,我能够推送它然后打开它,但我的项目不确定,只是欢迎屏幕。然后,我尝试以正常方式进行操作,它告诉我它不确定默认语言是什么,所以我登录了 heroku 并确保构建包设置为 python,但现在我收到此错误并且它仍然没有推送。我的 .git 文件夹在根目录中,当我推送时,我在根目录中。我确保检查 git 状态,它说我在我的临时分支上,不确定如何将其切换回 master,但在我进行更改之前,它说没有什么可提交的,工作树干净。

remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to shrouded-sands-60485.
remote: 
To https://git.heroku.com/shrouded-sands-60485.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/shrouded-sands-60485.git'

要求.txt

beautifulsoup4==4.8.2
dj-database-url==0.5.0
Django==2.2.3
django-bootstrap4==1.1.1
django-storages==1.9.1
djangorestframework==3.10.2
Markdown==3.1.1
pbr==5.4.5
Pillow==7.0.0
pygame==1.9.6
pytz==2019.1
six==1.14.0
soupsieve==2.0
sqlparse==0.3.0
stevedore==1.32.0
virtualenv==16.6.1
virtualenv-clone==0.5.4
virtualenvwrapper==4.8.4

**目录**

.
├── 11_env
│   ├── bin
│   ├── lib
│   └── pyvenv.cfg
├── dating_app
│   ├── __init__.py
│   ├── __pycache__
│   ├── admin.py
│   ├── apps.py
│   ├── chat.html
│   ├── forms.py
│   ├── media
│   ├── migrations
│   ├── models.py
│   ├── static
│   ├── tag.py
│   ├── templates
│   ├── templatetags
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── dating_project
│   ├── __init__.py
│   ├── __pycache__
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── db.sqlite3
└── manage.py

除了通过在项目根目录中执行pip freeze > requirements.txt来手动指定 python 版本和requirements.txt来添加runtime.txt之外,请确保 git 通过git add <filename>git commit <filename> -m <message>跟踪这两个文件。

最新更新