インストール

pip3 install PyInstaller
brew install pyside@2

Error: /opt/homebrew is not writable. You should change the
ownership and permissions of /opt/homebrew back to your
user account:
  sudo chown -R $(whoami) /opt/homebrew
Error: The following directories are not writable by your user:
/opt/homebrew
/opt/homebrew/share/zsh
/opt/homebrew/share/zsh/site-functions
/opt/homebrew/var/homebrew/locks

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /opt/homebrew /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew/locks

And make sure that your user has write permission.
  chmod u+w /opt/homebrew /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions /opt/homebrew/var/homebrew/locks

sudo chown -R $(whoami) /opt/homebrew
If you need to have pyside@2 first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/pyside@2/bin:$PATH"' >> ~/.zshrc

For compilers to find pyside@2 you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/pyside@2/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/pyside@2/include"

For pkg-config to find pyside@2 you may need to set:
  export PKG_CONFIG_PATH="/opt/homebrew/opt/pyside@2/lib/pkgconfig"
If you need to have curl first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/curl/bin:$PATH"' >> ~/.zshrc

For compilers to find curl you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/curl/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/curl/include"

For pkg-config to find curl you may need to set:
  export PKG_CONFIG_PATH="/opt/homebrew/opt/curl/lib/pkgconfig"