prompt keeps popping up asking me to install the command line developer tools

After installing xcode13.3, a prompt keeps popping up asking me to install the command line developer tools, but I have already installed it, and this prompt keeps popping up, what should I do?

Post not yet marked as solved Up vote post of horry Down vote post of horry
1.5k views
  • // xcode-select --install ? i enter this xcode-select: error: command line tools are already installed, use "Software Update" to install updates // got this

    but this system always tell me: python: error: Failed to locate 'python'. xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

Add a Comment

Replies

The python command was traditionally an alias for Python 2.x, which is no longer available. If you want to use the built-in Python 3, invoke it with python3. However, in most cases it’s best to install your own Python because Apple’s built-in copies have been deprecated. You can learn more about this in the Scripting Language Runtimes section of the macOS Catalina 10.15 Release Notes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I am running into the same problem and cannot find a solution. This is what I see (note the developer command line tools are installed)

$ python
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
$ python3
Python 3.8.9 (default, Jul 19 2021, 09:37:32)
[Clang 13.0.0 (clang-1300.0.27.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ ln -s /usr/bin/python3 /usr/local/bin/python
$ which python
/usr/local/bin/python
$ python
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
$ /usr/local/bin/python
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
$ /usr/bin/env python
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

If I put another python on my PATH (outside of /usr/bin and /usr/local/bin) it seems to work fine. Eg,

$ ln -s /usr/bin/python3 /some/other/path/python
$ export PATH=/some/other/path:$PATH
$ which python
/some/other/path/python
$ python
Python 3.8.9 (default, Jul 19 2021, 09:37:32)
[Clang 13.0.0 (clang-1300.0.27.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

However, this is not a tenable solution and I have hundreds of scripts that rely on #!/usr/bin/env python. Is there a way to get xcode-select to stop prompting me to install command line tools for python?

I'm getting the same repeated prompt while trying to set up playwright in VSCode.

npm ERR! 2 warnings generated. npm ERR! xcode-select: Failed to locate 'python', requesting installation of command line developer tools. npm ERR! make: *** [Release/sass.a] Error 72 npm ERR! *** ERR! build error npm ERR! *** ERR! stack Error: make failed with exit code: 2 npm ERR! *** ERR! stack at ChildProcess.onExit (/Users/!/repos/Sia-dashboard/node_modules/node-***/lib/build.

clicking install on modal begins download and installation but process isn't completed, as when returning to VSCode to continue playwright setup, I get the same error messages again

Python is installed (Python 3.10.5), I have previously installed Xcode command line developer tools, so I'm not sure why I'm stuck in this loop.

Doing the following command

xcode-select -p

results in

/Library/Developer/CommandLineTools

Then I took a look at /Library/Developer/CommandLineTools/usr/bin/ didn't have any python binary. However there was a python3 binary. So I created a symlink and this solved my problem. Following is the command I ran

sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python

This created the required python binary for xcode and solved the issue.

So general solution would be to find out where xcode-select is looking for python binary and then create a symlink in that location

  • Thanks macos 12.4; xcode 13.4.1; xcode-select -p results in /Applications/Xcode.app/Contents/Developer Good enough for now

  • Thank you @vishal098! Your solution worked for me.

Add a Comment