[Numpy-discussion] distutils issue - python 3.1 on windows

Ralf Gommers ralf.gommers@googlemail....
Mon Aug 2 10:48:52 CDT 2010


Hi,

I'm trying to get building to work with Python 3.1 under Wine on OS X. The
first thing you run into is a python distutils problem, which is fixed by
replacing line 379 of  cygwinccompiler.py with
    result = RE_VERSION.search(str(out_string))

The next thing I run into is a numpy.distutils issue (complete build output
below email):

  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\mingw32ccompiler.py",
line 177, in link
    func(*args[:func.__func__.__code__.co_argcount])
AttributeError: 'function' object has no attribute '__func__'

What I think that line is for is to test what kind of arguments can be
passed to 'func', but I'm really not sure. A comment would have been
helpful, that must be the most obscure line of Python code I've ever seen:)
Does anyone have any idea what causes this error?

Thanks,
Ralf



<... 2to3 output ...>

F2PY Version 1
Running from numpy source
directory.numpy\core\code_generators\generate_umath.py:117:
DeprecationWarning: string.maketrans is deprecated, use bytes.maketrans
instead
  bytes(string.ascii_uppercase, "ascii"))
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in C:\Python31\lib
  libraries mkl,vml,guide not found in C:\
  libraries mkl,vml,guide not found in C:\Python31\libs
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in C:\Python31\lib
  libraries ptf77blas,ptcblas,atlas not found in C:\
  libraries ptf77blas,ptcblas,atlas not found in C:\Python31\libs
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in C:\Python31\lib
  libraries f77blas,cblas,atlas not found in C:\
  libraries f77blas,cblas,atlas not found in C:\Python31\libs
  NOT AVAILABLE

Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\system_info.py:1399:
UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  FOUND:
    libraries = ['blas']
    library_dirs = ['C:\\local\\lib\\yop\\nosse']
    language = f77

  FOUND:
    libraries = ['blas']
    library_dirs = ['C:\\local\\lib\\yop\\nosse']
    define_macros = [('NO_ATLAS_INFO', 1)]
    language = f77

lapack_opt_info:
lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in C:\Python31\lib
  libraries mkl,vml,guide not found in C:\
  libraries mkl,vml,guide not found in C:\Python31\libs
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in C:\Python31\lib
  libraries lapack_atlas not found in C:\Python31\lib
  libraries ptf77blas,ptcblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries ptf77blas,ptcblas,atlas not found in C:\Python31\libs
  libraries lapack_atlas not found in C:\Python31\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
  libraries f77blas,cblas,atlas not found in C:\Python31\lib
  libraries lapack_atlas not found in C:\Python31\lib
  libraries f77blas,cblas,atlas not found in C:\
  libraries lapack_atlas not found in C:\
  libraries f77blas,cblas,atlas not found in C:\Python31\libs
  libraries lapack_atlas not found in C:\Python31\libs
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\system_info.py:1306:
UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  FOUND:
    libraries = ['lapack']
    library_dirs = ['C:\\local\\lib\\yop\\nosse']
    language = f77

  FOUND:
    libraries = ['lapack', 'blas']
    library_dirs = ['C:\\local\\lib\\yop\\nosse']
    define_macros = [('NO_ATLAS_INFO', 1)]
    language = f77

could not resolve pattern in '': '*.txt'
non-existing path in '': 'COMPATIBILITY'
non-existing path in '': 'site.cfg.example'
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.1
creating build\src.win32-3.1\numpy
creating build\src.win32-3.1\numpy\distutils
building library "npymath" sources
gcc -dumpversion
ld -v
dllwrap --version
customize GnuFCompiler
Found executable C:\MinGW\bin\g77.exe
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
Found executable C:\MinGW\bin\g77.exe
customize GnuFCompiler
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize GnuFCompiler using config
C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes

compile options: '-Inumpy\core\src\private -Inumpy\core\src -Inumpy\core
-Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath
-Inumpy\core\include -IC:\Python31\include -IC:\Python31\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Inumpy\core\src\private
-Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath
-Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\include
-IC:\Python31\include -IC:\Python31\PC -c _configtest.c -o _configtest.o
Found executable C:\MinGW\bin\gcc.exe
Traceback (most recent call last):
  File "setup.py", line 210, in <module>
    setup_package()
  File "setup.py", line 203, in setup_package
    configuration=configuration )
  File "Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\core.py",
line 186, in setup
    return old_setup(**new_attr)
  File "C:\Python31\lib\distutils\core.py", line 149, in setup
    dist.run_commands()
  File "C:\Python31\lib\distutils\dist.py", line 919, in run_commands
    self.run_command(cmd)
  File "C:\Python31\lib\distutils\dist.py", line 938, in run_command
    cmd_obj.run()
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\build.py",
line 37, in run
    old_build.run(self)
  File "C:\Python31\lib\distutils\command\build.py", line 128, in run
    self.run_command(cmd_name)
  File "C:\Python31\lib\distutils\cmd.py", line 315, in run_command
    self.distribution.run_command(command)
  File "C:\Python31\lib\distutils\dist.py", line 938, in run_command
    cmd_obj.run()
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\build_src.py",
line 152, in run
    self.build_sources()
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\build_src.py",
line 163, in build_sources
    self.build_library_sources(*libname_info)
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\build_src.py",
line 298, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\build_src.py",
line 385, in generate_sources
    source = func(extension, build_dir)
  File "numpy\core\setup.py", line 678, in get_mathlib_info
    st = config_cmd.try_link('int main(void) { return 0;}')
  File "C:\Python31\lib\distutils\command\config.py", line 248, in try_link
    libraries, library_dirs, lang)
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\config.py",
line 149, in _link
    libraries, library_dirs, lang))
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\command\config.py",
line 89, in _wrap_method
    ret = mth(*((self,)+args))
  File "C:\Python31\lib\distutils\command\config.py", line 145, in _link
    target_lang=lang)
  File "C:\Python31\lib\distutils\ccompiler.py", line 808, in
link_executable
    debug, extra_preargs, extra_postargs, None, target_lang)
  File
"Z:\Users\rgommers\Code\numpy\build\py3k\numpy\distutils\mingw32ccompiler.py",
line 177, in link
    func(*args[:func.__func__.__code__.co_argcount])
AttributeError: 'function' object has no attribute '__func__'


Captured Task Output:
---------------------

---> pavement.bdist_superpack
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Paver-1.0.1-py2.6.egg/paver/tasks.py",
line 164, in _run_task
    return do_task()
  File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Paver-1.0.1-py2.6.egg/paver/tasks.py",
line 161, in do_task
    return func(**kw)
  File "pavement.py", line 213, in bdist_superpack
    bdist_wininst_arch(pyver, 'nosse')
  File "pavement.py", line 196, in bdist_wininst_arch
    _bdist_wininst(pyver, SITECFG[arch])
  File "pavement.py", line 266, in _bdist_wininst
    subprocess.check_call(cmd, env=cfg_env)
  File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py",
line 488, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['wine',
'/Users/rgommers/.wine/drive_c/Python31/python.exe', 'setup.py', 'build',
'-c', 'mingw32', 'bdist_wininst']' returned non-zero exit status 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100802/2be52496/attachment.html 


More information about the NumPy-Discussion mailing list