title: Visual Studio 17 not found while visual studio 19 is installed
body: <p>I am using win 10 and Anaconda 4.8.3 and Python 3.7.4. Under the C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools I have SDK. Below are folders I see:</p>
  <p><a href="https://i.stack.imgur.com/ctUTQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ctUTQ.png" alt="enter image description here" /></a></p>
  <p>After installing keras (conda install -c conda-forge keras) I started to have problems. I updated anaconda, but whenever I open the cmd prompt of anaconda, I see the following errors:</p>
  <pre><code>C:\Users\MyName&gt;python C:\Users\MyName\Anaconda3\etc\keras\load_config.py  1&gt;temp.txt
  C:\Users\MyName&gt;set /p KERAS_BACKEND= 0&lt;temp.txt
  C:\Users\MyName&gt;del temp.txt
  C:\Users\MyName&gt;python -c &quot;import keras&quot;  1&gt;nul 2&gt;&amp;1
  
  C:\Users\MyName&gt;if errorlevel 1 (
  ver  1&gt;nul
   set &quot;KERAS_BACKEND=theano&quot;
  python -c &quot;import keras&quot;  1&gt;nul 2&gt;&amp;1
  )
  
   C:\Users\MyName&gt;SET DISTUTILS_USE_SDK=1
   C:\Users\MyName&gt;SET MSSdk=1
   C:\Users\MyName&gt;SET &quot;VS_VERSION=15.0&quot;
   C:\Users\MyName&gt;SET &quot;VS_MAJOR=15&quot;
   C:\Users\MyName&gt;SET &quot;VS_YEAR=2017&quot;
   C:\Users\MyName&gt;set &quot;MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out&quot;
   C:\Users\MyName&gt;set &quot;MSYS2_ENV_CONV_EXCL=CL&quot;
   C:\Users\MyName&gt;set &quot;PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll&quot;
   C:\Users\MyName&gt;set &quot;CXX=cl.exe&quot;
   C:\Users\MyName&gt;set &quot;CC=cl.exe&quot;
   C:\Users\MyName&gt;set &quot;VSINSTALLDIR=&quot;
  
   C:\Users\MyName&gt;for /F &quot;usebackq tokens=*&quot; %i in (`vswhere.exe -nologo -products * -version 
   [15.0,16.0) -property installationPath`) do (set &quot;VSINSTALLDIR=%i\&quot; )
  
   C:\Users\MyName&gt;if not exist &quot;&quot; (for /F &quot;usebackq tokens=*&quot; %i in (`vswhere.exe -nologo -products * 
   -requires Microsoft.VisualStudio.Component.VC.v141.x86.x64 -property installationPath`) do (set 
   &quot;VSINSTALLDIR=%i\&quot; ) )
  
   C:\Users\MyName&gt;if not exist &quot;&quot; (set &quot;VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual 
   Studio\2017\Professional\&quot; )
  
   C:\Users\MyName&gt;if not exist &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\&quot; 
   (set &quot;VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\&quot; )
  
    C:\Users\MyName&gt;if not exist &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\&quot; (set 
  &quot;VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\&quot; )
  
  C:\Users\MyName&gt;if not exist &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\&quot; (set 
  &quot;VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\&quot; )
  
    C:\Users\MyName&gt;IF NOT &quot;&quot; == &quot;&quot; (
    set &quot;INCLUDE=;&quot;
    set &quot;LIB=;&quot;
    set &quot;CMAKE_PREFIX_PATH=;&quot;
     )
  
      C:\Users\MyName&gt;call :GetWin10SdkDir
  
      C:\Users\MyName&gt;call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1&gt;nul 2&gt;&amp;1
  
      C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1&gt;nul 2&gt;&amp;1
  
      C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1&gt;nul 2&gt;&amp;1
  
      C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1&gt;nul 2&gt;&amp;1
  
      C:\Users\MyName&gt;if errorlevel 1 exit /B 1
  
     C:\Users\MyName&gt;exit /B 0
  
     C:\Users\MyName&gt;for /F %i in ('dir /ON /B &quot;C:\Program Files (x86)\Windows Kits\10\\include\10.*&quot;') 
      DO (SET WindowsSDKVer=%~i )
  
     C:\Users\MyName&gt;(SET WindowsSDKVer=10.0.18362.0 )
  
     C:\Users\MyName&gt;if errorlevel 1 (echo &quot;Didn't find any windows 10 SDK. I'm not sure if things will 
   work, but let's try...&quot; )  else (echo Windows SDK version found as: &quot;10.0.18362.0&quot; )
   Windows SDK version found as: &quot;10.0.18362.0&quot;
  
    C:\Users\MyName&gt;IF &quot;win-64&quot; == &quot;win-64&quot; (
    set &quot;CMAKE_GEN=Visual Studio 15 2017 Win64&quot;
    set &quot;BITS=64&quot;
    )  else (
    set &quot;CMAKE_GEN=Visual Studio 15 2017&quot;
    set &quot;BITS=32&quot;
    )
  
    C:\Users\MyName&gt;pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
    The system cannot find the path specified.
  
    C:\Users\MyName&gt;CALL &quot;VC\Auxiliary\Build\vcvars64.bat&quot; -vcvars_ver=14.16 10.0.18362.0
    The system cannot find the path specified.
  
    C:\Users\MyName&gt;popd
  
    C:\Users\MyName&gt;IF &quot;&quot; == &quot;&quot; SET &quot;CMAKE_GENERATOR=Visual Studio 15 2017 Win64&quot;
  
    C:\Users\MyName&gt;call :GetWin10SdkDirHelper HKLM\SOFTWARE\Wow6432Node  1&gt;nul 2&gt;&amp;1
  
    C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE\Wow6432Node  1&gt;nul 2&gt;&amp;1
  
    C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKLM\SOFTWARE  1&gt;nul 2&gt;&amp;1
  
    C:\Users\MyName&gt;if errorlevel 1 call :GetWin10SdkDirHelper HKCU\SOFTWARE  1&gt;nul 2&gt;&amp;1
  
    C:\Users\MyName&gt;if errorlevel 1 exit /B 1
  
    C:\Users\MyName&gt;exit /B 0
  
   (base) C:\Users\MyName&gt;
  </code></pre>
  <p>I tried updating my anaconda, removing some old paths in the user environment variables, restarting my system, uninstall and install keras again, but nothing worked. Any help is extremely appreciated.</p>