Opened 5 years ago

Closed 5 years ago

#58515 closed defect (fixed)

py-scikit-learn @0.21.1: IndexError: list index out of range

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: chrstphrchvz (Christopher Chavez)
Port: py-scikit-learn

Description

Build fails:

Partial import of sklearn during the build process.
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'project_urls'
  warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
Traceback (most recent call last):
  File "setup.py", line 290, in <module>
    setup_package()
  File "setup.py", line 286, in setup_package
    setup(**metadata)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/distutils/core.py", line 137, in setup
    config = configuration()
  File "setup.py", line 174, in configuration
    config.add_subpackage('sklearn')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage
    caller_level = 2)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1005, in get_subpackage
    caller_level = caller_level + 1)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 942, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "sklearn/setup.py", line 80, in configuration
    maybe_cythonize_extensions(top_path, config)
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-scikit-learn/py37-scikit-learn/work/scikit-learn-0.21.1/sklearn/_build_utils/__init__.py", line 68, in maybe_cythonize_extensions
    with_openmp = check_openmp_support()
  File "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-scikit-learn/py37-scikit-learn/work/scikit-learn-0.21.1/sklearn/_build_utils/openmp_helpers.py", line 104, in check_openmp_support
    if 'nthreads=' in output[0]:
IndexError: list index out of range

Change History (8)

comment:1 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Does this happen only on 10.9? I didn't encounter this for Python 3.7 on macOS 10.14 Mojave/Xcode 10.2. I wonder if updating to 0.21.2 addresses this.

comment:2 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:3 Changed 5 years ago by jmroot (Joshua Root)

10.9 and older. You can see which platforms a port succeeded and failed on by clicking on the green tick or red cross next to the commit in the history, e.g. https://github.com/macports/macports-ports/commits/master/python/py-scikit-learn

comment:4 Changed 5 years ago by kencu (Ken)

may not be an os version issue, though. If it's dying when checking for openmp support, forcing a compiler that supports openmp might work.

comment:5 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

comment:6 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

In 2f718f1ea896bf5d4b70eb981e8b043ead2b715b/macports-ports (master):

py-scikit-learn: force OpenMP-capable compiler

Use option introduced in MacPorts 2.6.0:
https://trac.macports.org/wiki/CompilerSelection

See: #58515

comment:7 in reply to:  6 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

In 2f718f1ea896bf5d4b70eb981e8b043ead2b715b/macports-ports (master):

py-scikit-learn: force OpenMP-capable compiler

Use option introduced in MacPorts 2.6.0:
https://trac.macports.org/wiki/CompilerSelection

See: #58515

Does this change resolve the issue?

comment:8 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.