Environment not working anymore on macos

I had some issues with running PyMC (versions 5.6.1 and 5.16.2) after updating macOS and Xcode only (to version 15.4). I am still on macOS 14 Sonoma.

I agree with @twiecki that clang++ of PyMC is pointing to the wrong version. It should be pointing to the one with Xcode installation. I agree with @Werdna48 that the issue is with Xcode
This is the weird thing that happened after I upgrade Xcode.

I tried this in my Terminal:

xcodebuild -version

and I got this error

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

If anyone has this same error like me, what you should do is to follow this article here: macos - xcode-select active developer directory error - Stack Overflow

Enter this line of code into your Terminal to point your clang++

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This will point Xcode (and clang++) to the correct folder.