It seems that you haven't installed the right compiler. vc_enc isn't a C++-compiler. The answer to getCompilerName should be like this:
ans = vc15_community_x64
Please check that you have installed the C++-compiler of the package (another tick of a check box during installation). C:\Program Files (x86)\Microsoft Visual Studio 17.0\VC (or similar) should contain vcvarsall.bat and \bin\amd64\cl.exe.