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!
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Python,
- Python: Convert Date to DateTime
- How to sort a List using Lambda in Python
- Python matplotlib segmentation fault: 11 macOS Big Sur
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to install Python 3.11 on Mac
- How to flatten a nested list in Python
- Python: Pandas Merge DataFrames on Index Example
- How to Run all Cells at Once Jupyter Notebook
- Python - Convert float to String
- How to add borders to tkinter label text
- How to Exit a Loop in Python Code
- [Python] Fix: ValueError: All arrays must be of the same length
- Sorting an array using Bubble Sort in Python Programming
- How to Unzip a file using Python
- Python: Merge DataFrames Pandas Outer Join Example
- Change label (text) color in tkinter
- Convert Float to String in Python
- Fix: fatal error: No such file or directory compilation terminated
- Python: Access index/counter of a for loop iteration
- Import Other Python Files Examples
- How to install Anaconda on Mac (M1/M2 Mac)
- Python Regular Expression to Find All Matches in List
- How to Read a binary File with Python
- How to disable warnings while Python file execution
- Know current Python Version
More Posts:
- SharePoint error 2130575251 - The security validation for this page is invalid and might be corrupted - SharePoint
- How to install and Configure sar sysstat tools in Ubuntu Linux - Linux
- Java 8 Display time in 12 hour AM PM format - Java
- Java equals method - Tutorial - Java
- Accept Only 0-9 Numbers RegEx Example - HowTos
- How to Save Eclipse console logs in external log file - Eclipse
- How to escape HTML characters in Java - Java
- How to check if Key Exists in Python Dictionary? - Python