[Numpy-discussion] Compiling NumPy on Windows for Python 3.3 with MSVC 2010

Peter Cock p.j.a.cock@googlemail....
Wed Nov 14 12:10:24 CST 2012

Changing title to reflect the fact this thread is now about using
the Microsoft compiler rather than mingw32 as in the old thread.

On Sat, Nov 10, 2012 at 11:04 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
> On Sat, Nov 10, 2012 at 5:47 PM, Ralf Gommers <ralf.gommers@gmail.com> wrote:
>> On Tue, Nov 6, 2012 at 6:49 PM, Peter Cock <p.j.a.cock@googlemail.com>
>> wrote:
>>> Dear all,
>>> Since the NumPy 1.7.0b2 release didn't include a Windows
>>> (32 bit) installer for Python 3.3, I am considering compiling it
>>> myself for local testing. What compiler is recommended?
>> Either MSVC or MinGW 3.4.5. For the latter see
>> https://github.com/certik/numpy-vendor
> Thanks Ralf,
> I was trying with MSVC 9.0 installed, but got this cryptic error:
>    C:\Downloads\numpy-1.7.0b2 > C:\python33\python setup.py build
>    ...
>    error: Unable to find vcvarsall.bat
> After sprinkling distutils with debug statements, I found it was
> looking for MSVC v10 (not numpy's fault but the error is most
> unhelpful).
> Presumably "Microsoft Visual C++ 2010 Express Edition" is
> the appropriate thing to download?
> http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express

I would have tried this earlier, but it required Windows XP SP3
and there was something amiss with the permissions on my
work Windows machine preventing that update. Solved now,
and this file now exists:

C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat

I've tried my branch (focussed on mingw32 fixes), and numpy-1.7.0b2
but both fail at the same point. I did remove the old build directory first.

C:\Downloads\numpy-1.7.0b2>c:\python33\python setup.py build
Converting to Python3 via 2to3...
Could not locate executable efc
don't know how to compile Fortran code on platform 'nt'
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -Inumpy\core\src\private -Inumpy\core\src
-Inumpy\core -Inumpy\
core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath
-Inumpy\core\src\npysort -Inumpy\core\include -Ic:\python33\include
-Ic:\python33\include /Tc_configtest.c /Fo_configtest.obj
Found executable C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /nologo
/INCREMENTAL:NO _configtest.obj /OUT:_configtest.exe
Found executable C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe
mt.exe -nologo -manifest _configtest.exe.manifest
Found executable C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe

_configtest.exe.manifest : general error c1010070: Failed to load and
parse the manifest. The system cannot find the file specified.

removing: _configtest.c _configtest.obj
Traceback (most recent call last):
  File "setup.py", line 214, in <module>
  File "setup.py", line 207, in setup_package
    configuration=configuration )
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\core.py", line 186
, in setup
    return old_setup(**new_attr)
  File "c:\python33\lib\distutils\core.py", line 148, in setup
  File "c:\python33\lib\distutils\dist.py", line 917, in run_commands
  File "c:\python33\lib\distutils\dist.py", line 936, in run_command
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build.py",
 line 37, in run
  File "c:\python33\lib\distutils\command\build.py", line 126, in run
  File "c:\python33\lib\distutils\cmd.py", line 313, in run_command
  File "c:\python33\lib\distutils\dist.py", line 936, in run_command
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 152, in run
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 163, in build_sources
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 298, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 385, in generate_sources
    source = func(extension, build_dir)
  File "numpy\core\setup.py", line 648, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program

It appears a similar issue was raised before:

Any tips?


More information about the NumPy-Discussion mailing list