首页 > 解决方案 > 由于要求,无法将我的 django 应用程序推送到 heroku

问题描述

所以我正在尝试将我的 Django 应用程序部署到 heroku(使用他们的教程),我收到以下错误

终端信息:

diaj3@diaj3-TUF-Gaming-FX505DD-FX505DD:~/Desktop/direct_bet$ git push heroku master
Counting objects: 9177, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5988/5988), done.
Writing objects: 100% (9177/9177), 20.59 MiB | 1.29 MiB/s, done.
Total 9177 (delta 2148), reused 9177 (delta 2148)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: cp: cannot create regular file '/app/tmp/cache/.heroku/requirements.txt': No such file or directory
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Installing requirements with pip
remote:        ERROR: Could not find a version that satisfies the requirement apt-clone==0.2.1 (from -r /tmp/build_ca7b1fda063f2c983e5082dbb19235bf/requirements.txt (line 1)) (from versions: none)
remote:        ERROR: No matching distribution found for apt-clone==0.2.1 (from -r /tmp/build_ca7b1fda063f2c983e5082dbb19235bf/requirements.txt (line 1))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to protected-chamber-65006.
remote: 
To https://git.heroku.com/protected-chamber-65006.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/protected-chamber-65006.git'

这是树信息即使需求文件在那里,我在推送时仍然收到错误:

├── aposta_segura
│   ├── asgi.py
  ...
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── app
│   ├── admin.py
│   ├── apps.py
  ...
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── db.sqlite3
├── manage.py
├── requirements.txt
├── static
 ...
└── venv
    ├── bin
    │   ├── activate
...

标签: pythondjangopython-3.xherokupython-venv

解决方案


推荐阅读