MacOS Xcode is updated and it requires you to accept this change. If you don’t do so, it will throw requires command line developer tools error every time you try to run Git or Python commands.
Why this error is raised?
Although there is no issue with the command line, terminal, xcode or any other system resources but since Xcode is updated, Mac wants you to accept the terms & conditions and the update information. Otherwise it will keep popping up to reinstall command line developer tools.
Solution
As we mentioned in the previous sections, you need to accept the update information in xcode. Follow these steps –
- Open
xcode
from launcher. If you have multiple versions of xcode installed in your system then use the one attached with launcher. - Go to the updates section in xcode.
- Accept the terms & conditions.
- Install the updates.
- After installation, close the xcode and try running git & python commands in terminal.
Conclusion
In this article we saw how to resolve xcode error of reinstalling command line tools for git & python commands. As we mentioned in the solution section, this is due to the updates in xcode. You need to accept and install them. Doing this, will resolve your error.