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

Not able to build Numba and LLVM wheel for raiwidgets #1994

Open
lalita90 opened this issue Mar 6, 2023 · 5 comments
Open

Not able to build Numba and LLVM wheel for raiwidgets #1994

lalita90 opened this issue Mar 6, 2023 · 5 comments

Comments

@lalita90
Copy link

lalita90 commented Mar 6, 2023

I have Numba == '0.56.4' and llvmlite == '0.39.1' on Python 3.10. I am trying to install raiwidgets on my Mac and fail to build the wheel for Numba and llvmlite. Please guide me how can I proceed ahead

Collecting numba<0.54.0

Collecting llvmlite<0.35,>=0.34.0.dev0
Building wheels for collected packages: numba, llvmlite
Building wheel for numba (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [797 lines of output]
TBB not found
Using OpenMP from: /Users/lmeena/miniconda3
running bdist_wheel
running build
got version from file /private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/numba_f3c6cfe1011846519da61bcbfee07e4e/numba/_version.py {'version': '0.51.2', 'full': '9d570961590c09a1eba748c9c37e91d1224fc9ad'}
running build_py
creating build

  creating build/lib.macosx-11.1-arm64-cpython-310/numba/stencils

  running build_ext
  building 'numba._dynfunc' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/lmeena/miniconda3/include -arch arm64 -fPIC -O2 -isystem /Users/lmeena/miniconda3/include -arch arm64
  
  creating build/temp.macosx-11.1-arm64-cpython-310
  creating build/temp.macosx-11.1-arm64-cpython-310/numba
  INFO: compile options: '-I/Users/lmeena/miniconda3/include/python3.10 -c'
  extra options: '-g'
  INFO: clang: numba/_dynfuncmod.c
  INFO: clang -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib build/temp.macosx-11.1-arm64-cpython-310/numba/_dynfuncmod.o -o build/lib.macosx-11.1-arm64-cpython-310/numba/_dynfunc.cpython-310-darwin.so
  ld: warning: -undefined dynamic_lookup may not work with chained fixups
  building 'numba._dispatcher' extension
  INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/lmeena/miniconda3/include -arch arm64 -fPIC -O2 -isystem /Users/lmeena/miniconda3/include -arch arm64
  
  creating build/temp.macosx-11.1-arm64-cpython-310/numba/core
  creating build/temp.macosx-11.1-arm64-cpython-310/numba/core/typeconv
  INFO: compile options: '-I/Users/lmeena/miniconda3/lib/python3.10/site-packages/numpy/core/include -I/Users/lmeena/miniconda3/include/python3.10 -c'
  INFO: clang: numba/_dispatcher.c
  INFO: clang: numba/_dispatcherimpl.cpp
  INFO: clang: numba/_hashtable.c
  INFO: clang: numba/_typeof.c
  INFO: clang: numba/core/typeconv/typeconv.cpp
  numba/_dispatcher.c:26:13: error: no member named 'use_tracing' in 'struct _ts'
      tstate->use_tracing = 0;
      ~~~~~~  ^
  numba/_dispatcher.c:28:13: error: no member named 'use_tracing' in 'struct _ts'
      tstate->use_tracing = ((tstate->c_tracefunc != NULL)
      ~~~~~~  ^
  numba/_dispatcher.c:303:17: error: no member named 'use_tracing' in 'struct _ts'
      if (tstate->use_tracing && tstate->c_profilefunc)
          ~~~~~~  ^
  numba/_dispatcher.c:512:13: error: no member named 'use_tracing' in 'struct _ts'
      if (ts->use_tracing && ts->c_profilefunc) {
          ~~  ^
  4 errors generated.
  INFO: clang++ -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib build/temp.macosx-11.1-arm64-cpython-310/numba/_dispatcher.o build/temp.macosx-11.1-arm64-cpython-310/numba/_dispatcherimpl.o build/temp.macosx-11.1-arm64-cpython-310/numba/_hashtable.o build/temp.macosx-11.1-arm64-cpython-310/numba/_typeof.o build/temp.macosx-11.1-arm64-cpython-310/numba/core/typeconv/typeconv.o -L/Users/lmeena/miniconda3/lib/python3.10/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-11.1-arm64-cpython-310/numba/_dispatcher.cpython-310-darwin.so
  clang: error: no such file or directory: 'build/temp.macosx-11.1-arm64-cpython-310/numba/_dispatcher.o'
  error: Command "clang++ -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib -Wl,-rpath,/Users/lmeena/miniconda3/lib -L/Users/lmeena/miniconda3/lib build/temp.macosx-11.1-arm64-cpython-310/numba/_dispatcher.o build/temp.macosx-11.1-arm64-cpython-310/numba/_dispatcherimpl.o build/temp.macosx-11.1-arm64-cpython-310/numba/_hashtable.o build/temp.macosx-11.1-arm64-cpython-310/numba/_typeof.o build/temp.macosx-11.1-arm64-cpython-310/numba/core/typeconv/typeconv.o -L/Users/lmeena/miniconda3/lib/python3.10/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-11.1-arm64-cpython-310/numba/_dispatcher.cpython-310-darwin.so" failed with exit status 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numba
Running setup.py clean for numba

Building wheel for llvmlite (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running bdist_wheel
/Users/lmeena/miniconda3/bin/python /private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 191, in <module>
      main()
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 185, in main
      main_posix('osx', '.dylib')
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 107, in main_posix
      raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/Users/lmeena/miniconda3/bin/python' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build numba llvmlite
Installing collected packages: llvmlite, itsdangerous, scikit-learn, numba, gevent, Flask, statsmodels, sparse, shap, ipykernel, Flask-Cors, fairlearn, dice-ml, rai-core-flask, econml, responsibleai, raiwidgets
Attempting uninstall: llvmlite
Found existing installation: llvmlite 0.39.1
Uninstalling llvmlite-0.39.1:
Successfully uninstalled llvmlite-0.39.1
Running setup.py install for llvmlite ... error
error: subprocess-exited-with-error

× Running setup.py install for llvmlite did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
running install
/Users/lmeena/miniconda3/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
got version from file /private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/Users/lmeena/miniconda3/bin/python /private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/lmeena/miniconda3/lib/python3.10/subprocess.py", line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 191, in <module>
      main()
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 185, in main
      main_posix('osx', '.dylib')
    File "/private/var/folders/40/w4b2sfn55137nx2p8y9l1kfrh3hjcb/T/pip-install-4oe4fwdb/llvmlite_83ca82da771a413da3582fbbe23a40c1/ffi/build.py", line 107, in main_posix
      raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/Users/lmeena/miniconda3/bin/python' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of llvmlite
Moving to /Users/lmeena/miniconda3/lib/python3.10/site-packages/llvmlite
from /Users/lmeena/miniconda3/lib/python3.10/site-packages/~lvmlite
Moving to /Users/lmeena/miniconda3/lib/python3.10/site-packages/llvmlite-0.39.1-py3.10.egg-info
from /Users/lmeena/miniconda3/lib/python3.10/site-packages/~lvmlite-0.39.1-py3.10.egg-info
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> llvmlite

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Note: you may need to restart the kernel to use updated packages.

@konabuta
Copy link

konabuta commented Mar 7, 2023

@lalita90 Do you use Apple silicon?

@lalita90
Copy link
Author

lalita90 commented Mar 7, 2023

Hi, yes its Apple M1 Pro. I also tried doing this after downgrading my Python version to 3.9 but it doesn't work. Surprisingly, I was able to install the same on my macbook air with M1 chip but it runs out of memory and restarts the kernel as soon as I import it in macbook air.

@lalita90
Copy link
Author

@konabuta any update on this error? It's still not working

@krisbock
Copy link

Looks like the raiwidget versions for numba/llvm break on python 3.10. Try 3.9

@njacobson-nci
Copy link

numba has been pinned to <0.54.0 in the responsibleai requirements.txt for 2 years, that version of numba and it's required llvm only support up to python 3.9.

Not sure this requirement is still needed but it will need to be updated to use this repo with anything newer than python 3.9

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

No branches or pull requests

4 participants