エラーの内容

exec: Failed to execute process ‘/Users/user_name/.local/bin/awsumepy’: The file specified the interpreter ‘/Users/user_name/.local/pipx/venvs/awsume/bin/python’, which is not an executable command.

~ ❯❯❯  awsume mfa
exec: Failed to execute process '/Users/user_name/.local/bin/awsumepy': The file specified the interpreter '/Users/user_name/.local/pipx/venvs/awsume/bin/python', which is not an executable command.

状況

権限は足りてた。

~ ❯❯❯  ls -l ~/.local/pipx/venvs/awsume/bin/python
lrwxr-xr-x  1 user_name  staff  10  3 20 11:01 .local/pipx/venvs/awsume/bin/python@ -> python3.11

invalid interpreterって言われてる。

~ ❯❯❯  pipx list
venvs are in /Users/user_name/.local/pipx/venvs
apps are exposed on your $PATH at /Users/user_name/.local/bin
:warning:  package awsume has invalid interpreter /opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11

One or more packages have a missing python interpreter.
    To fix, execute: pipx reinstall-all

対応

To fix, execute: pipx reinstall-all と言われたので、pipx reinstall-all してみる

~ ❯❯❯  pipx reinstall-all
uninstalled awsume! :sparkles: :star2: :sparkles:
  installed package awsume 4.5.3, installed using Python 3.11.3
  These apps are now globally available
    - autoawsume
    - awsume
    - awsume-autocomplete
    - awsume-configure
    - awsume.bat
    - awsume.fish
    - awsume.ps1
    - awsumepy
done! :sparkles: :star2: :sparkles:

直った!

~ ❯❯❯  awsume --version
4.5.3
~ ❯❯❯  awsume mfa
Session token will expire at 2023-06-02 23:07:15

原因

正確なところは不明。
・awsumeが期待しているPythonのバージョンが変わった。
・Pythonの環境が何らかの理由で変更された、または破損した。(Pythonのアップデートや他のパッケージのインストールに引っ張られて壊れたとか……)