未为aws sam cli配置Python

未为aws sam cli配置Python,python,amazon-web-services,aws-lambda,serverless,aws-sam,Python,Amazon Web Services,Aws Lambda,Serverless,Aws Sam,我按照本教程构建SAM应用程序: 当我进行sam构建时,我得到了以下错误 ❯ sam build Building codeuri: hello_world/ runtime: python3.8 metadata: {} functions: ['HelloWorldFunction'] Build Failed Error: PythonPipBuilder:Validation - Binary validation failed for python, searched for pyt

我按照本教程构建SAM应用程序:

当我进行sam构建时,我得到了以下错误

❯ sam build
Building codeuri: hello_world/ runtime: python3.8 metadata: {} functions: ['HelloWorldFunction']

Build Failed
Error: PythonPipBuilder:Validation - Binary validation failed for python, searched for python in following locations  : ['/usr/bin/python'] which did not satisfy constraints for runtime: python3.8. Do you have python for runtime: python3.8 on your PATH?
通过这样做,我检查了python

❯ which python
python: aliased to python3
当我做python版本时,我得到了这个

❯ python --version
Python 3.8.2

请问我缺少什么以及如何解决这个问题?

查看你的模板中运行时的一些想法。考虑重新安装AWSCLI和SAMDID验证Python版本。现在卸载所有pythons/aws cli和sam cliThis解决了问题:@EmAe如果这解决了您的问题,请写下您自己问题的答案并接受它。这是允许的。请参阅帮助中心。在您的模板中查看运行时的一些想法,并考虑重新安装AWSCLI和SAMDID验证Python版本。现在卸载所有pythons/aws cli和sam cliThis解决了问题:@EmAe如果这解决了您的问题,请写下您自己问题的答案并接受它。这是允许的。请参阅帮助中心。