我得到了一个"失败的部署"尝试将我的网站部署到GitHub时。这是部署日志:
10:04:24 PM: Build ready to start
10:04:26 PM: Fetching cached dependencies
10:04:26 PM: Failed to fetch cache, continuing with build
10:04:26 PM: Starting to prepare the repo for build
10:04:26 PM: No cached dependencies found. Cloning fresh repo
10:04:26 PM: git clone git@github.com:chichihardcore/aboutthedata
10:04:28 PM: Preparing Git Reference refs/heads/master
10:04:30 PM: Starting build script
10:04:30 PM: Installing dependencies
10:04:31 PM: v8.9.4 is already installed.
10:04:31 PM: Now using node v8.9.4 (npm v5.6.0)
10:04:31 PM: Attempting ruby version 2.3.6, read from environment
10:04:33 PM: Using ruby version 2.3.6
10:04:33 PM: Using PHP version 5.6
10:04:33 PM: Installing pip dependencies
10:04:33 PM: Started restoring cached pip cache
10:04:33 PM: Finished restoring cached pip cache
10:04:33 PM: Collecting alabaster==0.7.10 (from -r requirements.txt (line 1))
10:04:33 PM: /opt/buildhome/python2.7/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318:
SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform.
This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see
https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
10:04:34 PM: SNIMissingWarning
10:04:34 PM: /opt/buildhome/python2.7/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122:
InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
10:04:34 PM: InsecurePlatformWarning
10:04:34 PM: Downloading alabaster-0.7.10-py2.py3-none-any.whl
10:04:34 PM: Collecting anaconda-client==1.6.9 (from -r requirements.txt (line 2))
10:04:34 PM: Could not find a version that satisfies the requirement anaconda-client==1.6.9 (from -r requirements.txt (line 2)) (from versions: 1.1.1, 1.2.2)
10:04:34 PM: No matching distribution found for anaconda-client==1.6.9 (from -r requirements.txt (line 2))
10:04:34 PM: Error installing pip dependencies
10:04:34 PM: Error running command: Build script returned non-zero exit code: 1
10:04:34 PM: Failing build: Failed to build site
10:04:34 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:04:34 PM: Finished processing build request in 8.986471267s
答案 0 :(得分:1)
Netlify的默认构建使用Python的2.7.4
版本。您可能需要的配置版本是3.6
通过在包含compatible version的存储库根目录中创建runtime.txt
文件,告诉Netlify使用更新版本的Python:
runtime.txt
3.6.2