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!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- How to convert int to ASCII in Python
- How to make use of SQLite Module in Python?
- Split a String into Sub-string and Parse in Python
- Python: Pandas Rename Columns with List Example
- How to run Python file from Mac Terminal
- How to Exit a Loop in Python Code
- Python: How to Plot a Histogram using Matplotlib and data as list
- MD5 Hashing in Python
- Jupyter: Safari Cant Connect to the Server localhost:8888/tree
- Fix: AttributeError: str object has no attribute decode. Did you mean: encode?[Python]
- How to Read a binary File with Python
- How to add two float numbers in Python
- Python: How to install YAML Package
- Python: How to Save Image from URL
- What is Markdown in Jupyter Notebook with Examples
- How to change the Python Default version
- 33: Python Program to send an email vid GMail
- How to comment code in Python
- How to Fix AttributeError in Python
- Fix: error: Jupyter command `jupyter-nbconvert` not found [VSCode]
- How to comment out a block of code in Python
- List of All 35 Reserved Keywords in Python Programming Language 3.11
- Import Other Python Files Examples
- Python: How to add Progress Bar in Console with Examples
- 3 Ways to convert bytes to String in Python
- Android Emulator cannot be opened because the developer cannot be verified. [M1 Mac] - Android
- Screen Mirroring iPhone to TV - iOS
- MySQL: How to Select Database via Terminal/Command Line - MySQL
- How to see storage usage details on OneDrive on Mac? - Windows
- How to install pip on macOS using terminal command [Python] - Python
- 3 Ways to Change Default 8080 Port in Spring Boot - Java
- How to Recover Deleted Messages on iPhone - iOS
- How to check your IP using bash for Windows? - Bash