python打包EXE报错!提示:output: xcrun: error: unable to exec Xcode native xcrun (Permission denied).

环境macbook pro, MAC OS 12.6 python打包成EXE报错!

auto-py-to-exe或者是pyinstaller打包程序总是提示:
output: xcrun: error: unable to exec Xcode native xcrun (Permission denied).

img

有尝试网上查找到的方法:解决办法是执行sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer ,但是依然报错!
请问,这个权限应该如何设置?

打开终端输入:sudo su, 然后再做操作