用于Python 3.4的Microsoft Visual C++编译器

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.这些是:

或者,您可以使用MinGw以不依赖于其他方式编译扩展.

请参阅:https://docs.python.org/2/install/#gnu-c-cygwin-MinGWhttps://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)

来源:py的Windows编译器

另请参考:这个答案


Col*_*nic 8

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

  • 你能详细说明吗?我有Visual Studio社区2015和Python 3.5.1,但是当我尝试使用pip安装numpy时,我得到vcvarsall.bat无法找到的错误(Visual Studio Community 2015似乎只有vcvars32.bat) (3认同)
  • 你好.尝试再次运行安装程序,确保在编程语言下检查`Visual C++`. (3认同)
  • 我有同样的问题.我在Win8.1上有VS Community 2015.看看"关于Microsoft Visual Studio"我看到安装了Visual C++ 2015.但是,在`C:\ Program Files(x86)\ Microsoft Visual Studio 14.0\VC \`文件夹中没有任何vsvarsall.bat文件的提示.我设法通过conda和pip与Python2.7安装numpy(和tensorflow),但没有使用Python3.5 (3认同)