简体   繁体   中英

Sam Build Failing due to python version

I was running python version 2.7.18, i installed the python3 because that is runtime for the lambda to build with sam build. I keep getting this error:

"Error: PythonPipBuilder:Validation - Binary validation failed for python, searched for python in following locations: ['/usr/bin/python', '/opt/homebrew/bin/python3', '/usr/bin/python3'] which did not satisfy constraints for runtime: python3.9. Do you have python for runtime: python3.9 on your PATH?"

I added to Path: 在此处输入图像描述

did not work.

I tried everything on this question and answer: How to export PATH to "sam build" command?

在此处输入图像描述 and

在此处输入图像描述

still getting Build failed.

when i run which python i still get: 在此处输入图像描述

which i check the --version for both python and python3 i get:

在此处输入图像描述 Not sure what I am missing? thanks for any help.

I just uninstalled both versions of python, and re-installed python3. That was the long way but it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM