【问题标题】:Netlify + Cactus: failed during stage 'building site': Build script returned non-zero exit code: 1Netlify + Cactus:在“构建站点”阶段失败:构建脚本返回非零退出代码:1
【发布时间】:2020-06-19 03:49:34
【问题描述】:

我正在关注如何在 netlify 上使用仙人掌部署 django 应用程序的指南:

https://www.netlify.com/blog/2016/04/08/a-step-by-step-guide-cactus-on-netlify/#building-your-site

我创建了一个新的私有 github 存储库,并按照文档将仙人掌的东西推送到它。

但是,当我尝试在 netlify 上部署它时,我收到此错误:

12:31:56 PM: [feature enabled]: Nitro deploys enabled. Buckle up! ⚡️
12:31:56 PM: Build ready to start
12:32:03 PM: build-image version: blablabla
12:32:03 PM: build-image tag: v3.3.6
12:32:03 PM: buildbot version: blablabla
12:32:03 PM: Fetching cached dependencies
12:32:04 PM: Failed to fetch cache, continuing with build
12:32:04 PM: Starting to prepare the repo for build
12:32:04 PM: No cached dependencies found. Cloning fresh repo
12:32:04 PM: git clone https://github.com/blablabla/blablabla
12:32:05 PM: Preparing Git Reference refs/heads/master
12:32:05 PM: Starting build script
12:32:05 PM: Installing dependencies
12:32:06 PM: v10.19.0 is already installed.
12:32:07 PM: Now using node v10.19.0 (npm v6.13.4)
12:32:07 PM: Attempting ruby version 2.6.2, read from environment
12:32:08 PM: Using ruby version 2.6.2
12:32:08 PM: Using PHP version 5.6
12:32:08 PM: Installing pip dependencies
12:32:08 PM: Started restoring cached pip cache
12:32:09 PM: Finished restoring cached pip cache
12:32:09 PM: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
12:32:09 PM: Collecting boto==2.49.0
12:32:09 PM:   Downloading boto-2.49.0-py2.py3-none-any.whl (1.4 MB)
12:32:10 PM: Collecting cactus==3.3.3
12:32:10 PM:   Downloading Cactus-3.3.3-py2.py3-none-any.whl (313 kB)
12:32:10 PM: Requirement already satisfied: certifi==2019.11.28 in /opt/buildhome/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 3)) (2019.11.28)
12:32:10 PM: Collecting colorama==0.4.3
12:32:10 PM:   Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
12:32:10 PM: Collecting colorlog==4.1.0
12:32:10 PM:   Downloading colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
12:32:10 PM: Collecting django==1.6.11
12:32:10 PM:   Downloading Django-1.6.11-py2.py3-none-any.whl (6.7 MB)
12:32:11 PM: Collecting django-markwhat==1.6.2
12:32:11 PM:   Downloading django_markwhat-1.6.2-py2.py3-none-any.whl (8.2 kB)
12:32:12 PM: Collecting keyring==5.7.1
12:32:12 PM:   Downloading keyring-5.7.1-py2.py3-none-any.whl (60 kB)
12:32:12 PM: Collecting markdown2==2.3.8
12:32:12 PM:   Downloading markdown2-2.3.8-py2.py3-none-any.whl (33 kB)
12:32:12 PM: Requirement already satisfied: six==1.14.0 in /opt/buildhome/python2.7/lib/python2.7/site-packages (from -r requirements.txt (line 10)) (1.14.0)
12:32:12 PM: ERROR: Could not find a version that satisfies the requirement tornado==6.0.4 (from -r requirements.txt (line 11)) (from versions: 0.2, 1.0, 1.1, 1.1.1, 1.2, 1.2.1, 2.0, 2.1, 2.1.1, 2.2, 2.2.1, 2.3, 2.4, 2.4.1, 3.0, 3.0.1, 3.0.2, 3.1, 3.1.1, 3.2, 3.2.1, 3.2.2, 4.0, 4.0.1, 4.0.2, 4.1b2, 4.1, 4.2b1, 4.2, 4.2.1, 4.3b1, 4.3b2, 4.3, 4.4b1, 4.4, 4.4.1, 4.4.2, 4.4.3, 4.5b1, 4.5b2, 4.5, 4.5.1, 4.5.2, 4.5.3, 5.0a1, 5.0b1, 5.0, 5.0.1, 5.0.2, 5.1b1, 5.1, 5.1.1)
12:32:12 PM: ERROR: No matching distribution found for tornado==6.0.4 (from -r requirements.txt (line 11))
12:32:12 PM: Error installing pip dependencies
12:32:12 PM: Error running command: Build script returned non-zero exit code: 1
12:32:12 PM: Failing build: Failed to build site
12:32:12 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:32:12 PM: Finished processing build request in 9.467329843s

我没有更改仙人掌目录中的任何内容。

另外,我使用的是带有 python 3.7 的虚拟环境,而不是 python 2.7。

谢谢

【问题讨论】:

    标签: django netlify


    【解决方案1】:

    我遇到了同样的挑战。 从错误日志中

    12:32:09 PM:弃用:Python 2.7 已于 2020 年 1 月 1 日结束生命周期。请升级您的 Python,因为不再维护 Python 2.7。未来版本的 pip 将不再支持 Python 2.7。有关 pip 中 Python 2 支持的更多详细信息,请访问https://pip.pypa.io/en/latest/development/release-process/#python-2-support

    这意味着部署是使用 Python 2.7 完成的,并且在安装 cactus 依赖项时安装了 tornado 6.0.4,与 Python 2.7 不兼容。

    您可以使用 $ pip install tornado==5.1.1 将 tornado 降级到 5.1.1

    我希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2021-02-04
      • 1970-01-01
      • 1970-01-01
      • 2019-10-26
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 2020-02-19
      • 1970-01-01
      相关资源
      最近更新 更多