【问题标题】:Push got rejected when push to heroku master, error happened when install python dependencies推送到heroku master时推送被拒绝,安装python依赖项时出错
【发布时间】:2020-01-01 05:28:36
【问题描述】:

我正在将 django-react 项目部署到 heroku。使用 requirements.txt 安装 python 依赖项时推送被拒绝。有人说这是因为 requirements.txt 中的某些库已被弃用。但我不确定是哪一个导致了问题以及如何解决它。谢谢。

Heroku 错误:

remote: -----> Build succeeded!
remote: -----> Python app detected
remote:  !     Python has released a security update! Please consider upgrading to python-3.7.3
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.7.4
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed

我的要求.txt:

certifi==2019.6.16
chardet==3.0.4
defusedxml==0.6.0
Django==2.2.4
django-allauth==0.39.1
django-cors-headers==3.1.0
django-countries==5.4
django-rest-auth==0.9.5
djangorestframework==3.10.2
gunicorn==19.9.0
idna==2.8
oauthlib==3.1.0
Pillow==6.1.0
python3-openid==3.1.0
pytz==2019.2
requests==2.22.0
requests-oauthlib==1.2.0
six==1.12.0
sqlparse==0.3.0
urllib3==1.25.3
whitenoise==4.1.3

【问题讨论】:

    标签: python django reactjs heroku


    【解决方案1】:

    使用

    清除 buildpack
    $ heroku buildpacks:clear
    

    然后再次设置 buildpack

    $ heroku buildpacks:set heroku/python
    

    【讨论】:

      【解决方案2】:

      requirements.txt 中包含setuptools==1.0

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-05-06
        • 2017-01-09
        • 2021-09-22
        • 1970-01-01
        • 1970-01-01
        • 2012-11-01
        • 1970-01-01
        相关资源
        最近更新 更多