首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Django Web应用程序Heroku Deployement :没有为decouple==0.0.7找到匹配的发行版

Django Web应用程序Heroku Deployement :没有为decouple==0.0.7找到匹配的发行版
EN

Stack Overflow用户
提问于 2020-01-26 06:09:26
回答 2查看 973关注 0票数 0

我正在部署一个在Heroku上用Django制作的web应用程序。我遵循一个教程,在没有来自用户的任何CSS /图像输入的情况下,导师已经做了一个w/s。但我的应用程序有很多风格和配置图等,需要ImageField在模型中。

IMP ->我为Django 2.2做了一个项目,但是django 3已经发布了,所以我正在使用它。

请帮帮我.

我已经完成了以下步骤:

  1. 安装Anaconda
  2. 制作虚拟环境并激活它。
  3. 已安装的pip
  4. 已安装的依赖项
  5. pip冻结> requirements.txt
  6. 吉特加。& git推送-am“文本”
  7. git推heroku大师

我的requirements.txt:

代码语言:javascript
复制
asgiref==3.2.3
certifi==2019.11.28
cffi==1.13.2
decouple==0.0.7
dj-database-url==0.5.0
Django==3.0.2
django-appconf==1.0.3
django-bootstrap3==12.0.3
django-heroku==0.3.1
django-mediumeditor==1.0.0
gunicorn==20.0.4
misaka==2.1.1
psycopg2==2.8.4
pycparser==2.19
python-decouple==3.3
pytz==2019.3
six==1.14.0
sqlparse==0.3.0
whitenoise==5.0.1

我的错误:

代码语言:javascript
复制
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 8 threads
Compressing objects: 100% (16/16), done.
Writing objects: 100% (16/16), 1.96 KiB | 1.96 MiB/s, done.
Total 16 (delta 9), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Need to update SQLite3, clearing cache
remote: -----> Installing python-3.6.10
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Installing requirements with pip
remote:        Collecting asgiref==3.2.3 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 1))
remote:          Downloading https://files.pythonhosted.org/packages/a5/cb/5a235b605a9753ebcb2730c75e610fb51c8cab3f01230080a8229fa36adb/asgiref-3.2.3-py2.py3-none-any.whl
remote:        Collecting certifi==2019.11.28 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 2))
remote:          Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
remote:        Collecting cffi==1.13.2 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 3))
remote:          Downloading https://files.pythonhosted.org/packages/49/72/0d42f94fe94afa8030350c26e9d787219f3f008ec9bf6b86c66532b29236/cffi-1.13.2-cp36-cp36m-manylinux1_x86_64.whl (397kB)
remote:        Collecting decouple==0.0.7 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 4))
remote:          Could not find a version that satisfies the requirement decouple==0.0.7 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 4)) (from versions: )
remote:        No matching distribution found for decouple==0.0.7 (from -r /tmp/build_4f35d204f58c179bdbd37fc71a4afa61/requirements.txt (line 4))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to *******.
remote: 
To https://git.heroku.com/******.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/******.git'
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-01-26 18:57:04

您将希望在项目根目录添加一个包含内容的runtime.txt文件:Python3.7.2

然后再推。

票数 1
EN

Stack Overflow用户

发布于 2020-01-26 12:24:22

您使用Python3.6,decouple 需要 Python 3.7+。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59915988

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档