[Numpy-discussion] Building Numpy 1.6.2 for Python 3.3 on Windows

klo klonuo@gmail....
Thu Jan 10 13:57:50 CST 2013


>> Numpy <= 1.6 is not compatible with Python 3.3. Use numpy >= 1.7.0rc1.
> Thanks for the tip
> 1.7.0rc builds without issue

Actually, this isn't over. It builds fine, but when I try to import 
numpy I get error:

========================================
...
from numpy.linalg import lapack_lite 
ImportError: DLL load failed: The specified module could not be found.
========================================

Google reveals that PATH has to be updated with "C:\Python33\Scripts" 
path, but then when I run `python3 setup.py build` I get another 
error:

========================================
C:\src\numpy-1.7.0rc1>python3 setup.py build
Converting to Python3 via 2to3...
Running from numpy source directory.
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  FOUND:
    define_macros = [('SCIPY_MKL_H', None)]
    libraries = ['mkl_rt']
    include_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/include']
    library_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/lib/ia32']

  FOUND:
    define_macros = [('SCIPY_MKL_H', None)]
    libraries = ['mkl_rt']
    include_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/include']
    library_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/lib/ia32']

non-existing path in 'numpy\\lib': 'benchmarks'
lapack_opt_info:
lapack_mkl_info:
mkl_info:
  FOUND:
    define_macros = [('SCIPY_MKL_H', None)]
    libraries = ['mkl_rt']
    include_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/include']
    library_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/lib/ia32']

  FOUND:
    define_macros = [('SCIPY_MKL_H', None)]
    libraries = ['mkl_rt']
    include_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/include']
    library_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/lib/ia32']

  FOUND:
    define_macros = [('SCIPY_MKL_H', None)]
    libraries = ['mkl_rt']
    include_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/include']
    library_dirs = ['C:/Progra~1/Intel/Compos~1/mkl/lib/ia32']

running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win32-3.3
creating build\src.win32-3.3\numpy
creating build\src.win32-3.3\numpy\distutils
building library "npymath" sources
Building import library (ARCH=x86): "c:\python33\libs\libpython33.a"
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:\src\numpy-1.7.0rc1\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:\src\numpy-1.7.0rc1\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:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\command\build_src.py", line 152, in run
    self.build_sources()
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\command\build_src.py", line 163, in build_sources
    self.build_library_sources(*libname_info)
  File "C:\src\numpy-1.7.0rc1\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:\src\numpy-1.7.0rc1\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:\src\numpy-1.7.0rc1\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_compiler
    dry_run=self.dry_run, force=1)
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\ccompiler.py", line 560, in new_compiler
    compiler = klass(None, dry_run, force)
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\mingw32ccompiler.py", line 91, in __init__
    build_import_library()
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\mingw32ccompiler.py", line 383, in build_import_library
    return _build_import_library_x86()
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\mingw32ccompiler.py", line 428, in _build_import_library_x86
    dlist, flist = lib2def.parse_nm(nm_output)
  File "C:\src\numpy-1.7.0rc1\build\py3k\numpy\distutils\lib2def.py", line 77, in parse_nm
    data = DATA_RE.findall(nm_output)
TypeError: can't use a string pattern on a bytes-like object
========================================

Any ideas?



More information about the NumPy-Discussion mailing list