title: how to deal with error at activating environment?
body: <p>When I try to activate a conda environment, these messages popped up, and the cmd window closed automatically. How to deal with this?</p>
  
  <pre><code>C:\Users\a&gt;SET DISTUTILS_USE_SDK=1 
  
  C:\Users\a&gt;SET MSSdk=1 
  
  C:\Users\a&gt;SET platform= 
  
  C:\Users\a&gt;IF /I [AMD64] == [amd64] set "platform=true" 
  
  C:\Users\a&gt;IF /I [] == [amd64] set "platform=true" 
  
  C:\Users\a&gt;if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" )  ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0" ) 
  
  C:\Users\a&gt;for /F "skip=2 tokens=2,*" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B" 
  
  C:\Users\a&gt;if "" == "" (set "VSINSTALLDIR=" ) 
  
  C:\Users\a&gt;if "" == "" (
  ECHO "Did not find VS in registry or in VS140COMNTOOLS env var - exiting"  
  exit 1 
  ) 
  "Did not find VS in registry or in VS140COMNTOOLS env var - exiting" 
  </code></pre>