I can fix this now for macOS 13 Ventura go to open $HOME/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/platform.txt (or use any text editor you like) and find
and go to the terminal and type which python to find the new path of you python I don't is it the same path for everyone or not
in terminal
% which python
/opt/anaconda3/bin/python (my path)
From
tools.gen_esp32part.cmd=python3 "{runtime.platform.path}/tools/gen_esp32part.py"
To
tools.gen_esp32part.cmd=/opt/anaconda3/bin/python "{runtime.platform.path}/tools/gen_esp32part.py"
and that it done