Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django Web App Heroku部署:未找到decouple==0.0.7的匹配发行版_Python_Django_Git_Heroku - Fatal编程技术网

Python Django Web App Heroku部署:未找到decouple==0.0.7的匹配发行版

Python Django Web App Heroku部署:未找到decouple==0.0.7的匹配发行版,python,django,git,heroku,Python,Django,Git,Heroku,我正在Heroku上部署一个Django制作的web应用程序。 我正在学习一个教程,其中导师制作了一个w/s,用户没有输入任何CSS/图像。但我的应用程序有很多风格和个人资料图片等,需要在模型中使用ImageField IMP->我为Django 2.2制作了这个项目,但是Django 3已经发布了,所以我正在使用它 请帮帮我… 我已完成以下步骤: 水蟒 制作虚拟环境并激活它 已安装pip 已安装的依赖项 pip freeze>requirements.txt 吉特加git推送-am“文本” g

我正在Heroku上部署一个Django制作的web应用程序。 我正在学习一个教程,其中导师制作了一个w/s,用户没有输入任何CSS/图像。但我的应用程序有很多风格和个人资料图片等,需要在模型中使用ImageField

IMP->我为Django 2.2制作了这个项目,但是Django 3已经发布了,所以我正在使用它

请帮帮我…

我已完成以下步骤:

  • 水蟒
  • 制作虚拟环境并激活它
  • 已安装pip
  • 已安装的依赖项
  • pip freeze>requirements.txt
  • 吉特加git推送-am“文本”
  • git推送heroku主机
  • My requirements.txt:

    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
    
    我的错误:

    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'
    

    如果使用Python 3.6,
    decouple
    Python 3.7+。

    您需要在项目的根目录下添加一个runtime.txt文件,其中包含以下内容: python-3.7.2

    然后再推