Aws-sam-cli: Installation immediately broken on macOS 10.15.5

Created on 8 Jul 2020  路  3Comments  路  Source: aws/aws-sam-cli

Description

Hi! I'd really like to get started with AWS SAM, but I'm unable to get the cli to work on my machine.

Steps to reproduce

 ~ 鈿★笍   brew install aws-sam-cli
==> Installing aws-sam-cli from aws/tap
==> Downloading https://github.com/awslabs/aws-sam-cli/releases/download/v0.53.0//aws-sam-cli-0.53.0.sierra.bottle.tar.gz
Already downloaded: /Users/julian/Library/Caches/Homebrew/downloads/967af9dae702ac5e4f24aa221eaa4e925f7afa86e68636f95d30ce9a27051a7f--aws-sam-cli-0.53.0.sierra.bottle.tar.gz
==> Pouring aws-sam-cli-0.53.0.sierra.bottle.tar.gz
馃嵑  /usr/local/Cellar/aws-sam-cli/0.53.0: 4,062 files, 66.0MB


~ 鈿★笍   sam --version
dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/aws-sam-cli/0.53.0/libexec/bin/python3.7
  Reason: image not found


~ 鈿★笍   python --version
Python 3.8.3

~ 鈿★笍   aws --version
aws-cli/2.0.29 Python/3.8.3 Darwin/19.5.0 botocore/2.0.0dev33

Observed result

Installation is broken immediately

Expected result

Get something like SAM CLI, version 0.52.0

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS 10.15.5
  2. sam --version: Nothing

Most helpful comment

@dschu-lab Had the same problem today after doing brew upgrade which upgraded my Python to v3.8.3_1. I think AWS SAM still refers internally to Python 3.7, what helped me was brew switch python 3.7.8.

I hope this helps.

All 3 comments

@dschu-lab Had the same problem today after doing brew upgrade which upgraded my Python to v3.8.3_1. I think AWS SAM still refers internally to Python 3.7, what helped me was brew switch python 3.7.8.

I hope this helps.

@dschu-lab Had the same problem today after doing brew upgrade which upgraded my Python to v3.8.3_1. I think AWS SAM still refers internally to Python 3.7, what helped me was brew switch python 3.7.8.

I hope this helps.

Thank you! This was the fix I was looking for! Horray! 馃コ

And if it happens again because python 3.7 is no longer available then there is a workaround:
https://github.com/aws/homebrew-tap/issues/93

brew install --build-from-source aws-sam-cli

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Caian picture Caian  路  3Comments

PhungXuanAnh picture PhungXuanAnh  路  3Comments

drumadrian picture drumadrian  路  3Comments

cmccoypdx picture cmccoypdx  路  3Comments

red8888 picture red8888  路  3Comments