python@3.9: the bottle needs the Apple Command Line Tools to be installed

Viewed 14890

I have zsh and Python 3.9 installed on my MacOS but whenever I try to try something in the command line, I'm getting this kind of error:

brew install python@3.7  # for example

Error: python@3.7: the bottle needs the Apple Command Line Tools to be installed.

Help would be appreciated.

3 Answers

Running this solved the problem for me:

xcode-select --install

I tried running xcode-select --install but estimated download time was over 280 hours, so I installed latest Apple Command Line Tools from

Apple Developer Downloads page

(File was under 700MB)

After that installation, brew upgrade python went without a hitch.

try to delete CommandLineTools: rm -rf /Library/Developer/CommandLineTools and reinstall it: $ xcode-select --install

I found this solution on github , Credit: Dmitry Chupahin

Related