我知道有一个"Microsoft Visual C++ Compiler for Python 2.7",但是有没有Microsoft Visual C++编译器for Python3.4或eve Microsoft Visual C++ Compiler for Python3.x呢?如果我不需要在我的整个实验室中安装不同版本的visual studio,那将是非常有益的。
发布于 2015-04-28 12:19:01
不幸的是,为了能够使用其他人提供的扩展模块,您将被迫使用官方编译器来编译Python。它们是:
用于Python2.7的
或者,您可以使用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构建扩展。
发布于 2016-06-04 21:57:46
对于不同的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
发布于 2015-09-28 21:25:56
Visual Studio Community 2015足以构建Python3.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
https://stackoverflow.com/questions/29909330
复制相似问题