I am trying to compile a python extension for Windows64 using distutils from "Python 2.5.1 (r251:54863, Apr 18 2007, 09:02:36) [MSC v.1400 64 bit (AMD64)] on win32". My extension basically is just a simple C code file which does a LoadLibrary (dlopen for unix) of my 64-bit shared library (dll/so) (and then call one function to test it). My python extension compiled and ran on unix, but not windows. Originally it says: File "C:\Python25\lib\distutils\msvccompiler.py", line 616, in get_msvc_paths AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root' Then when I try it after setting env variables DISTUTILS_USE_SDK and MSSdk (both to "1"), it says: error: Don't know how to compile demo.C ditutils doc (dist.pdf) section 11.4 says: Typically, extension modules need to be compiled with the same compiler that was used to compile Python. ... The AMD64 and Itanium binaries are created using the Platform SDK. I am using Visual Studios 8 normally, but I downloaded the Platform SDK 2003 SP1. I opened the start menu "Set Windows XP x64 Build Environment (Retail)", and tried building it from there. This made no difference; I got the same errors. Not fun at all :-(