Rus*_*ber 48 python windows compilation python-3.x
我知道有一个"用于Python 2.7的Microsoft Visual C++编译器",但目前或计划中是否有用于Python 3.4的Microsoft Visual C++编译器或用于Python 3.x的Microsoft Visual C++编译器?如果我不必在整个实验室安装不同版本的visual studio,那将是非常有益的.
Viv*_*edt 28
不幸的是,为了能够使用其他人提供的扩展模块,您将被迫使用官方编译器来编译Python.这些是:
Visual Studio 2008 for Python 2.7.请参阅:https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows
Visual Studio 2010 for 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或https://docs.python.org/3.4/install/#gnu-c-cygwin-mingw
这允许您有一个编译器为Python,Python 2.x和Python 3.x两个版本构建扩展.
Ani*_*non 11
对于不同的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
Run Code Online (Sandbox Code Playgroud)
另请参考:这个答案
Visual Studio Community 2015足以构建Python 3.5的扩展.它是免费的,但下载量为6 GB(矫枉过正).在我的电脑上,它安装了vcvarsall 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