--- C:/Python27/Lib/distutils/msvc9compiler.py	Wed Jul 25 15:42:47 2018
+++ C:/Python27/Lib/distutils/msvc9compiler.py	Wed Jul 25 16:19:30 2018
@@ -46,11 +46,13 @@
     VSEXPRESS_BASE = r"Software\Wow6432Node\Microsoft\VCExpress\%0.1f"
     WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
     NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
+    VCFORPYTHON_BASE = r"Software\Wow6432Node\Microsoft\DevDiv\VCForPython\%s"
 else:
     VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
     VSEXPRESS_BASE = r"Software\Microsoft\VCExpress\%0.1f"
     WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
     NET_BASE = r"Software\Microsoft\.NETFramework"
+    VCFORPYTHON_BASE = r"Software\Microsoft\DevDiv\VCForPython\%s"
 
 # A map keyed by get_platform() return values to values accepted by
 # 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is
@@ -235,6 +237,14 @@
         try:
             productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
                                        "productdir")
+        except KeyError:
+            productdir = None
+
+    # trying VC for Python
+    if productdir is None:
+        try:
+            productdir = Reg.get_value(VCFORPYTHON_BASE % version,
+                                       "installdir")
         except KeyError:
             productdir = None
             log.debug("Unable to find productdir in registry")
