Or just put this in Python2.h: #ifdef _DEBUG #define _DEBUG_2 #undef _DEBUG #include <Python.h> #define _DEBUG #undef _DEBUG_2 #endif and then include Python2.h instead of Python.h. Defining _DEBUG makes python use python22_d.lib instead of python22.lib. Or you can just make all your builds release builds, but this kills all of your assert()'s.