无服务器部署错误-无法在本地找到图像
Serverless deploy error - unable to find image locally
我正在关注 this 教程,了解如何将 python 包与无服务器一起使用。一切正常,直到我使用 serverless-deploy
进行部署。然后我收到以下错误。有谁知道如何解决这个问题?
其他信息:
- OS: Windows 10
- WLS 发行版:Ubuntu v2
Serverless: Generated requirements from C:\Users\path-to-project\numpy-test\requirements.txt in C:\Users\path-to-project\numpy-test\.serverless\requirements.txt...
Serverless: Installing requirements from C:\Users\myname\AppData\Local\UnitedIncome\serverless-python-requirements\Cache\e1e710a0b480eb4e7e39fca7f1ff66fff4b6f5d572ded1d71d5082f9afe1de06_slspyc\requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python3.6
Serverless: Using download cache directory C:\Users\myname\AppData\Local\UnitedIncome\serverless-python-requirements\Cache\downloadCacheslspyc
Serverless: Running docker run --rm -v C\:/Users/myname/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/e1e710a0b480eb4e7e39fca7f1ff66fff4b6f5d572ded1d71d5082f9afe1de06_slspyc\:/var/task\:z -v C\:/Users/myname/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/downloadCacheslspyc\:/var/useDownloadCache\:z -u 0 lambci/lambda\:build-python3.6 python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache...
Error ---------------------------------------------------
Error: STDOUT:
STDERR: Unable to find image 'lambci/lambda:build-python3.6' locally
build-python3.6: Pulling from lambci/lambda
832a9fa6947e: Pulling fs layer
fe6bfd165af8: Pulling fs layer
c61e272c0488: Pulling fs layer
7022c87fa044: Pulling fs layer
ab51495a619c: Pulling fs layer
28e9e78ca9d3: Pulling fs layer
6b8ec334143c: Pulling fs layer
7022c87fa044: Waiting
6b8ec334143c: Waiting
ab51495a619c: Waiting
28e9e78ca9d3: Waiting
c61e272c0488: Verifying Checksum
c61e272c0488: Download complete
7022c87fa044: Verifying Checksum
7022c87fa044: Download complete
ab51495a619c: Verifying Checksum
ab51495a619c: Download complete
28e9e78ca9d3: Download complete
6b8ec334143c: Download complete
832a9fa6947e: Verifying Checksum
832a9fa6947e: Download complete
fe6bfd165af8: Download complete
832a9fa6947e: Pull complete
fe6bfd165af8: Pull complete
c61e272c0488: Pull complete
7022c87fa044: Pull complete
ab51495a619c: Pull complete
28e9e78ca9d3: Pull complete
6b8ec334143c: Pull complete
Digest: sha256:9b1cea555bfed62d1fc9e9130efa9842ee144ef02e2a6a266f1c9e6adeb0866f
Status: Downloaded newer image for lambci/lambda:build-python3.6
ERROR: Could not find a version that satisfies the requirement numpy==1.21.2
ERROR: No matching distribution found for numpy==1.21.2
WARNING: You are using pip version 21.0; however, version 21.2.4 is available.
You should consider upgrading via the '/var/lang/bin/python -m pip install --upgrade pip' command.
从 Pypi 开始,numpy==1.21.2
要求 python 版本为 Python >=3.7, <3.11
。
您应该将 lambda 映像升级到 lambci/lambda:build-python3.8
或将 numpy 版本降级到支持 python3.6
.
的 numpy==1.19.5
我正在关注 this 教程,了解如何将 python 包与无服务器一起使用。一切正常,直到我使用 serverless-deploy
进行部署。然后我收到以下错误。有谁知道如何解决这个问题?
其他信息:
- OS: Windows 10
- WLS 发行版:Ubuntu v2
Serverless: Generated requirements from C:\Users\path-to-project\numpy-test\requirements.txt in C:\Users\path-to-project\numpy-test\.serverless\requirements.txt...
Serverless: Installing requirements from C:\Users\myname\AppData\Local\UnitedIncome\serverless-python-requirements\Cache\e1e710a0b480eb4e7e39fca7f1ff66fff4b6f5d572ded1d71d5082f9afe1de06_slspyc\requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python3.6
Serverless: Using download cache directory C:\Users\myname\AppData\Local\UnitedIncome\serverless-python-requirements\Cache\downloadCacheslspyc
Serverless: Running docker run --rm -v C\:/Users/myname/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/e1e710a0b480eb4e7e39fca7f1ff66fff4b6f5d572ded1d71d5082f9afe1de06_slspyc\:/var/task\:z -v C\:/Users/myname/AppData/Local/UnitedIncome/serverless-python-requirements/Cache/downloadCacheslspyc\:/var/useDownloadCache\:z -u 0 lambci/lambda\:build-python3.6 python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache...
Error ---------------------------------------------------
Error: STDOUT:
STDERR: Unable to find image 'lambci/lambda:build-python3.6' locally
build-python3.6: Pulling from lambci/lambda
832a9fa6947e: Pulling fs layer
fe6bfd165af8: Pulling fs layer
c61e272c0488: Pulling fs layer
7022c87fa044: Pulling fs layer
ab51495a619c: Pulling fs layer
28e9e78ca9d3: Pulling fs layer
6b8ec334143c: Pulling fs layer
7022c87fa044: Waiting
6b8ec334143c: Waiting
ab51495a619c: Waiting
28e9e78ca9d3: Waiting
c61e272c0488: Verifying Checksum
c61e272c0488: Download complete
7022c87fa044: Verifying Checksum
7022c87fa044: Download complete
ab51495a619c: Verifying Checksum
ab51495a619c: Download complete
28e9e78ca9d3: Download complete
6b8ec334143c: Download complete
832a9fa6947e: Verifying Checksum
832a9fa6947e: Download complete
fe6bfd165af8: Download complete
832a9fa6947e: Pull complete
fe6bfd165af8: Pull complete
c61e272c0488: Pull complete
7022c87fa044: Pull complete
ab51495a619c: Pull complete
28e9e78ca9d3: Pull complete
6b8ec334143c: Pull complete
Digest: sha256:9b1cea555bfed62d1fc9e9130efa9842ee144ef02e2a6a266f1c9e6adeb0866f
Status: Downloaded newer image for lambci/lambda:build-python3.6
ERROR: Could not find a version that satisfies the requirement numpy==1.21.2
ERROR: No matching distribution found for numpy==1.21.2
WARNING: You are using pip version 21.0; however, version 21.2.4 is available.
You should consider upgrading via the '/var/lang/bin/python -m pip install --upgrade pip' command.
从 Pypi 开始,numpy==1.21.2
要求 python 版本为 Python >=3.7, <3.11
。
您应该将 lambda 映像升级到 lambci/lambda:build-python3.8
或将 numpy 版本降级到支持 python3.6
.
numpy==1.19.5