Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

40.7.0 fails with "AttributeError: 'unicode' object has no attribute 'compiler_type'" #1655

Closed
leonid-butenko opened this issue Jan 28, 2019 · 1 comment

Comments

@leonid-butenko
Copy link

leonid-butenko commented Jan 28, 2019

I work with virtualenvs and after 4.7 release I cannot build my project anymore

here is the error:

Making install in yaros.utils
make[1]: Entering directory '/work/yaros/yaros.utils'
/bin/bash /work/yaros/install-sh -d //work/inst/.virtualenv/dev_test/lib
PYTHONPATH=//work/inst/.virtualenv/dev_test/lib/python2.7/site-packages: /work/inst/.virtualenv/dev_test/bin/python ../yaros.utils/setup.py install --root=/ --prefix=/work/inst/.virtualenv/dev_test
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
  libraries mkl_rt not found in ['/work/inst/.virtualenv/dev_test/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/']
  NOT AVAILABLE

openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
customize UnixCCompiler
C compiler: gcc -pthread -fno-strict-aliasing -m64 -fPIC -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

creating /tmp/tmpWHnPa6/tmp
creating /tmp/tmpWHnPa6/tmp/tmpWHnPa6
compile options: '-c'
gcc: /tmp/tmpWHnPa6/source.c
/tmp/tmpWHnPa6/source.c:1:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 void zungqr_();
 ^
gcc -pthread /tmp/tmpWHnPa6/tmp/tmpWHnPa6/source.o -L/opt/mettools/lib -lopenblas -o /tmp/tmpWHnPa6/a.out
customize UnixCCompiler
  FOUND:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/mettools/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]

  FOUND:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/opt/mettools/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]

could not resolve pattern in '': 'yaros/utils/testtools/data/*.nc'
running install
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
Traceback (most recent call last):
  File "../yaros.utils/setup.py", line 104, in <module>
    setup_package()
  File "../yaros.utils/setup.py", line 97, in setup_package
    configuration = configuration,
  File "/opt/mettools/lib/python2.7/site-packages/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "//work/inst/.virtualenv/dev_test/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/opt/mettools/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/opt/mettools/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/mettools/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/mettools/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 62, in run
    r = self.setuptools_run()
  File "/opt/mettools/lib/python2.7/site-packages/numpy/distutils/command/install.py", line 36, in setuptools_run
    return distutils_install.run(self)
  File "/opt/mettools/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
  File "/opt/mettools/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/mettools/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/mettools/lib/python2.7/site-packages/numpy/distutils/command/build.py", line 47, in run
    old_build.run(self)
  File "/opt/mettools/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/opt/mettools/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/mettools/lib/python2.7/distutils/dist.py", line 971, in run_command
    cmd_obj.ensure_finalized()
  File "/opt/mettools/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/opt/mettools/lib/python2.7/site-packages/numpy/distutils/command/config_compiler.py", line 70, in finalize_options
    if not isinstance(v, str): v = v.compiler_type
AttributeError: 'unicode' object has no attribute 'compiler_type'
Makefile:580: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/work/yaros/yaros.utils'
Makefile:434: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Platform Ubuntu 18.04 / Python 2.7.15 / virtualenv 16.0.0 / virtualenvwrapper 4.8.2 / numpy 1.15.1

Downgrading to setuptools 40.6.3 resolves an issue.

@leonid-butenko leonid-butenko changed the title 4.7.0 fails with "AttributeError: 'unicode' object has no attribute 'compiler_type'" 40.7.0 fails with "AttributeError: 'unicode' object has no attribute 'compiler_type'" Jan 28, 2019
@benoit-pierre
Copy link
Member

Duplicate of #1653.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants