Xcode command lIne tools are not installed

Hi all,
I am using appium 1.6.5 with system configuration as :

Mac :Sierra (10.12), Xcode - 8.2.1
When I run appium-doctor from command line it shows:
“WARN AppiumDoctor :heavy_multiplication_x: Xcode Command Line Tools are NOT installed!
WARN AppiumDoctor :heavy_multiplication_x: DevToolsSecurity is NOT enabled!”

When I run ‘xcode-select --install’ it says “xcode-select: error: command line tools are already installed, use “Software Update” to install updates”.
Please help me in fixing this issue.
Attaching appium-doctor log for reference.

I think, you have two versions of xcode installed and its pointing to the old version
try $ xcode-select -p and see if it points to the correct location

Well, in my case yes – there are two Xcodes but I can see that it’s pointing to the right installation /Applications/Xcode.app/Contents/Developer. I have Xcode.app and Xcode_7 under /Applications folder. Still getting the same error