If you recently purchased a new Mac/Macbook or had a fresh installation of the latest macOS on your device (macOS Sonoma) you will see that when you run a python3 command on the Terminal you get a popup that says.
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.
Cancel Install
This is because you need additional xcode-select tools are required to be installed on your system in order to run Python.
Code2care@Mac % python3
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.
So click install and follow the instructions in order to run Python on your Mac.
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Python,
- 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
More Posts:
- How to Find Downloaded Files on Windows 11 - Windows-11
- Bash How to Save Output of a Command to a Variable - Bash
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting - SharePoint
- Display List of Databases in mysql Command Line - MySQL
- How to change user image icon macOS Big Sur - MacOS
- How to destroy PHP session() - PHP
- How to create Gradle Multi-Project in IntelliJ - Gradle
- Microsoft Teams Error code - 6 issue - Teams