Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building with MSVC

Mike Toews edited this pageJun 16, 2018 ·5 revisions

These are instructions on building 32- and 64- bit Windows extensions andwheels on Windows, using the Microsoft Visual Studio compilers.

The compiler collection is called Microsoft Visual Studio (MSVS). The C andC++ compilers are a subset of Microsoft Visual Studio, and we'll call thatsubset Microsoft Visual C / C++ (MSVC).

All the install packages on this page are free to download and use, althoughthere are also non-free MSVS packages.

See also:https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows

Python 2.7

Python 2.7 needs Microsoft Visual Studio 2008 giving MSVC++ version 9.0 (seePython and MSVC).

Fortunately Microsoft provides a specific download of MSVS 2008 for buildingPython extensions athttps://aka.ms/vcpython27. SeeSteve Dower's distutilspostfor details.

You should be able to download and install from this installer to enablebuilding 32- and 64- bit Python extensions and wheels on Python 2.7, includingnumpy.

As for all MSVS installers, this package doesn't include a Fortran compiler, because there is no MSVSFortran compiler, so you cannot use this package for compiling Scipy.

Python 3.3 / Python 3.4

Python 3.3 and 3.4 need MSVS 2010 (MSVC++ version 10.0).

Unfortunately there is no equivalent to the Python 2.7 installer for MSVS2008, so the installation is rather more complicated.

Your best bet is to install the MSVC compilers via the Windows 7.1 SDK packages - seethese instructions.

Python 3.5

Python 3.5 was compiled with MSVS 2015. To compile Python 3.5 extensions, you can installVS 2015community edition. Be warned, this is a huge (> 10GB installed size) package that will take a long time to install.

Mixing versions of MSVS

The standard instructions are to compile extensions with the same version ofMSVS used to compile Python itself - MSVS 2008 for Python 2.7, MSVS 2010 forPython 3.3 and 3.4. If you try to compile extensions with different MSVSversions you may well run into clashes between the run-time libraries used bythe different MSVS versions.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp