After I upgraded my iMac to 12.3 Monterey and upgraded Xcode to version 13.3, I got an error python: command not found in the project that could run in the previous version. I checked a lot of information, but I still don't know how to deal with it.
About XCode prompt python: command not found after upgrading Mac to 12.3
If you were relying on the Python 2.7 installation provided by macOS, the macOS 10.15 Release Notes advised it would be removed at some point, and how you should prepare:
Scripting Language Runtimes Deprecations Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run python3 from within Terminal. (51097165)
The macOS 12.3 Release Notes confirm that's what happened:
Python Deprecations Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)