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?"
did not work.
I tried everything on this question and answer: How to export PATH to "sam build" command?
still getting Build failed.
when i run which python i still get:
which i check the --version for both python and python3 i get:
I just uninstalled both versions of python, and re-installed python3. That was the long way but it worked.