Python 3.4 的 Microsoft Visual C++ 编译器
Microsoft Visual C++ Compiler for Python 3.4
我知道有一个 "Microsoft Visual C++ Compiler for Python 2.7" 但目前或计划中有一个用于 Python 3.4 的 Microsoft Visual C++ 编译器或用于 Python 的 Microsoft Visual C++ 编译器 3.x 就此而言?如果我不必在我的整个实验室中安装不同版本的 visual studio,那将是非常有益的。
不幸的是,为了能够使用别人提供的扩展模块,您将不得不使用官方编译器来编译Python。它们是:
Visual Studio 2008 年 Python 2.7。
参见:https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows
Visual Studio 2010 年 Python 3.4。
参见:https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows
或者,您可以使用 MinGw 以不依赖于其他方式的方式编译扩展。
参见:https://docs.python.org/2/install/#gnu-c-cygwin-MinGW or https://docs.python.org/3.4/install/#gnu-c-cygwin-mingw
这允许您使用一个编译器为 Python、Python 2.x 和 Python 3.x 两个版本构建扩展。
Visual Studio Community 2015 足以为 Python 3.5 构建扩展。它是免费的,但需要 6 GB 的下载空间(矫枉过正)。在我的电脑上,它在 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
安装了 vcvarsall
对于 Python 3.4,您需要 Visual Studio 2010。我认为没有任何免费版本。参见 https://matthew-brett.github.io/pydagogue/python_msvc.html
对于不同的 python 版本:
Visual C++ |CPython
--------------------
14.0 |3.5
10.0 |3.3, 3.4
9.0 |2.6, 2.7, 3.0, 3.1, 3.2
另请参阅:this answer
我知道有一个 "Microsoft Visual C++ Compiler for Python 2.7" 但目前或计划中有一个用于 Python 3.4 的 Microsoft Visual C++ 编译器或用于 Python 的 Microsoft Visual C++ 编译器 3.x 就此而言?如果我不必在我的整个实验室中安装不同版本的 visual studio,那将是非常有益的。
不幸的是,为了能够使用别人提供的扩展模块,您将不得不使用官方编译器来编译Python。它们是:
Visual Studio 2008 年 Python 2.7。 参见:https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows
Visual Studio 2010 年 Python 3.4。 参见:https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows
或者,您可以使用 MinGw 以不依赖于其他方式的方式编译扩展。
参见:https://docs.python.org/2/install/#gnu-c-cygwin-MinGW or https://docs.python.org/3.4/install/#gnu-c-cygwin-mingw
这允许您使用一个编译器为 Python、Python 2.x 和 Python 3.x 两个版本构建扩展。
Visual Studio Community 2015 足以为 Python 3.5 构建扩展。它是免费的,但需要 6 GB 的下载空间(矫枉过正)。在我的电脑上,它在 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
对于 Python 3.4,您需要 Visual Studio 2010。我认为没有任何免费版本。参见 https://matthew-brett.github.io/pydagogue/python_msvc.html
对于不同的 python 版本:
Visual C++ |CPython
--------------------
14.0 |3.5
10.0 |3.3, 3.4
9.0 |2.6, 2.7, 3.0, 3.1, 3.2
另请参阅:this answer