1. 현상

/Users/<사용자명>/Library/Python/3.7/bin/aws: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory

2. 해결책

나에겐 해당사항 없는 방법이었다.

나에겐 해당사항 없는 방법이었다.

나에겐 해당사항 없는 방법이었다.

2.1. awscli 재설치

$ brew reinstall awscli
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/manifests/1.23
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/blobs/sha256:0d0aeea95f9e7b4ccfa1e8d7f3a83b3b4d604eac1178e4f88ad51d132ad1f7cd
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0d0aeea95f9e7b4ccfa1e8d7f3a83b3b4d604eac1178e4f88ad51d132ad1f7cd?s
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2022-03-29
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:e777028f6008e695fe33b07ddc0c13f149b4bbe2289bbd65173daadc98fcfc7d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:e777028f6008e695fe33b07ddc0c13f149b4bbe2289bbd65173daadc98fcfc7d?s
(생략)
==> Caveats
==> awscli
The "examples" directory has been installed to:
  /usr/local/share/awscli/examples

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

2.2. 링크 재설정

$ brew unlink awscli && brew link awscli
Unlinking /usr/local/Cellar/awscli/2.5.4... 6 symlinks removed.
Linking /usr/local/Cellar/awscli/2.5.4... 6 symlinks created.

3. 나의 해결책

$ aws --version
aws-cli/2.5.4 Python/3.9.12 Darwin/21.4.0 source/x86_64 prompt/off

그런데 .zprofile을 확인해보니 PATH에 python 경로가 잘못 잡혀있었다. 그래서 python 3.9 경로로 수정하고 다시 프로파일 적용하고 실행하니 잘 됨.