I have installed the Command Line Tools:
$ xcode-select --print-path
/Library/Developer/CommandLineTools
However, when anything tries to us
There's also a GUI to change the Command Line Tools path in Xcode > Preferences > Locations:
I just had this issue after upgrading to Xcode 10.3 while keeping an older copy of 10.2.1 in a sub-folder in Applications. When I opened this Locations panel the selection for Command Line Tools was blank, but I was able to choose between the two versions installed:
I tend to go with the GUI option if it's available instead of copying in sudo
commands from SO.