不幸的是,要能够使用其他人提供的扩展模块,您将不得不使用正式的编译器来编译Python。这些是:
适用于Python 2.7的Visual Studio 2008。请参阅:https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows
适用于Python 3.4的Visual Studio 2010。请参阅:https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows
另外,您可以使用MinGw以不依赖其他方式的方式编译扩展。
请参阅:https://docs.python.org/2/install/#gnu-c-cygwin- MinGW或https://docs.python.org/3.4/install/#gnu-c-cygwin- mingw
这样,您就可以使用一个编译器来为Python,Python 2.x和Python 3.x的两个版本构建扩展。