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

Peter Cock p.j.a.cock@googlemail....
Sat Nov 10 17:13:56 CST 2012


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 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
>
> Ralf

I was trying with mingw32 via cygwin with gcc 2.4.4,
which also failed with a cryptic error:

C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\system_info.py:1406: UserW
arning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\system_info.py:1409: UserW
arning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler opti
ons
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt
ions
running build_src
build_src
building py_modules sources
building library "npymath" sources
Traceback (most recent call last):
  File "setup.py", line 214, in <module>
    setup_package()
  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
    dist.run_commands()
  File "c:\python33\lib\distutils\dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "c:\python33\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build.py",
 line 37, in run
    old_build.run(self)
  File "c:\python33\lib\distutils\command\build.py", line 126, in run
    self.run_command(cmd_name)
  File "c:\python33\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\python33\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 152, in run
    self.build_sources()
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\build_src.
py", line 163, in build_sources
    self.build_library_sources(*libname_info)
  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 646, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File "c:\python33\lib\distutils\command\config.py", line 243, in try_link
    self._check_compiler()
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\command\config.py"
, line 45, in _check_compiler
    old_config._check_compiler(self)
  File "c:\python33\lib\distutils\command\config.py", line 98, in _check_compile
r
    dry_run=self.dry_run, force=1)
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\ccompiler.py", lin
e 560, in new_compiler
    compiler = klass(None, dry_run, force)
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\mingw32ccompiler.p
y", line 94, in __init__
    msvcr_success = build_msvcr_library()
  File "C:\Downloads\numpy-1.7.0b2\build\py3k\numpy\distutils\mingw32ccompiler.p
y", line 336, in build_msvcr_library
    if int(msvcr_name.lstrip('msvcr')) < 80:
AttributeError: 'NoneType' object has no attribute 'lstrip'

I am updating cygwin to see if anything changes...

Peter


More information about the NumPy-Discussion mailing list