I am attempting to perform a sam deployment and upon running the command:
sam build --template template.yaml --build-dir ./build --use-container
I see that the image "amazon/aws-sam-cli-build-image-python3.6" is successfully pulled but then I obtain the following error:
Build Failed Error: PythonPipBuilder:ResolveDependencies - pip executable not found in your python environment at /var/lang/bin/python3.6
I really have no clue why this is happening since I would expect that once the python image was pulled, pip and its dependencies would be installed.
Appreciate any help, thanks in advance!
You need to install the pip for your python distribution like this:
sudo apt-get install python3-pip
More in this link: Python 3.6 No module named pip
I encountered this issue after installing the sam-cli with pipx (I also use pyenv). My global python version from pyenv was 3.6 and the sam-cli was somehow finding python at /usr/bin/python3.8 instead of the pyenv shim. After setting the local python version to 3.8.6 with pyenv's .python-version file in the root of the project, the error message went away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With