On my new Macbook, when I tired to run Python command on the Terminal I got an message,
code2care@Code2cares-MacBook-Air bin % python3 hello.py
xcode-select: note: No developer tools were found, requesting install.
If developer tools are located at a non-default location on disk,
use `sudo xcode-select --switch path/to/Xcode.app` to specify
the Xcode that you wish to use for command line developer tools,
and cancel the installation dialog.
See `man xcode-select` for more details.

With this I got an pop-ip for installation of Xcode-select.
The "python3" command requires the command line developer tools.
Would you like to install the tools now?
Choose Install to download and install the command line developer tools now.

But when I clicked on Install I got another error,
It looks like as I am still on the Beta version of macOS Sonona, the Xcode-Select version of software is not available via this process yet, I remember facing the same issue while working the previous macOS Ventura 13.x version as well.
The fix for this is to download, Xcode-select (The Command Line Tool) from the Apple's developers website
Command Line Tools for Xcode 15 beta 7
August 22, 2023
This package enables UNIX-style development via Terminal by installing command line developer tools,
as well as macOS SDK frameworks and headers. Many useful tools are included,
such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these
tools are also embedded within the Xcode IDE.
Once I installed it and ran Python command, it worked!
This is not an AI-generated article but is demonstrated by a human on an M1 Mac running macOS Sonoma 14.0.
Please support independent contributors like Code2care by donating a coffee.
Buy me a coffee!

Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!