numba/llvmlite 构建轮子失败

问题描述 投票:0回答:1

我正在尝试使用 venv 使用

pip3 install ddsp
安装 ddsp。 我已经安装了 ddsp 所需的依赖项,我成功安装了 numba 和 llvmlite,但是当我尝试安装 ddsp 时,一段时间后我得到以下输出:

    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
      ╰─> [919 lines of output]
          /tmp/pip-install-vwar_wlk/numba_9bda532cbe9d4d8886cb806387be79c2/setup.py:94: DeprecationWarning:
          
            `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
            of the deprecation of `distutils` itself. It will be removed for
            Python >= 3.12. For older Python versions it will remain present.
            It is recommended to use `setuptools < 60.0` for those Python versions.
            For more details, see:
              https://numpy.org/devdocs/reference/distutils_status_migration.html
          
          
            import numpy.distutils.misc_util as np_misc
          TBB not found
          OpenMP disabled
          /home/lonskyne/.venv/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
          !!
          
                  ********************************************************************************
                  Requirements should be satisfied by a PEP 517 installer.
                  If you are using pip, you can try `pip install --use-pep517`.
                  ********************************************************************************
          
          !!
            dist.fetch_build_eggs(dist.setup_requires)
          running bdist_wheel
          running build
          got version from file /tmp/pip-install-vwar_wlk/numba_9bda532cbe9d4d8886cb806387be79c2/numba/_version.py {'version': '0.49.1', 'full': 'd2cac8597ad2aa4074147d9c7595f5b5e9919901'}
          running build_py
          creating build
          creating build/lib.linux-x86_64-cpython-311
          creating build/lib.linux-x86_64-cpython-311/numba
          copying numba/__init__.py -> build/lib.linux-x86_64-cpython-311/numba
...
          copying numba/cuda/tests/cudadrv/data/jitlink.ptx -> build/lib.linux-x86_64-cpython-311/numba/cuda/tests/cudadrv/data
          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: gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC
          
          creating build/temp.linux-x86_64-cpython-311
          creating build/temp.linux-x86_64-cpython-311/numba
          INFO: compile options: '-I/home/lonskyne/.venv/include -I/usr/include/python3.11 -c'
          extra options: '-g'
          INFO: gcc: numba/_dynfuncmod.c
          INFO: gcc -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto build/temp.linux-x86_64-cpython-311/numba/_dynfuncmod.o -o build/lib.linux-x86_64-cpython-311/numba/_dynfunc.cpython-311-x86_64-linux-gnu.so
          building 'numba._dispatcher' extension
          INFO: C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC
          
          creating build/temp.linux-x86_64-cpython-311/numba/core
          creating build/temp.linux-x86_64-cpython-311/numba/core/typeconv
          INFO: compile options: '-I/home/lonskyne/.venv/lib/python3.11/site-packages/numpy/core/include -I/home/lonskyne/.venv/include -I/usr/include/python3.11 -c'
          INFO: gcc: numba/_dispatcher.c
          INFO: gcc: numba/_dispatcherimpl.cpp
          INFO: gcc: numba/_hashtable.c
          INFO: gcc: numba/_typeof.c
          INFO: gcc: numba/core/typeconv/typeconv.cpp
          numba/_dispatcher.c: In function ‘call_trace’:
          numba/_dispatcher.c:26:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
             26 |     tstate->use_tracing = 0;
                |             ^~~~~~~~~~~
                |             tracing
          numba/_dispatcher.c:28:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
             28 |     tstate->use_tracing = ((tstate->c_tracefunc != NULL)
                |             ^~~~~~~~~~~
                |             tracing
          numba/_dispatcher.c: In function ‘call_cfunc’:
          numba/_dispatcher.c:303:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
            303 |     if (tstate->use_tracing && tstate->c_profilefunc)
                |                 ^~~~~~~~~~~
                |                 tracing
          numba/_dispatcher.c:340:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
            340 |         tstate->frame = frame;
                |                 ^~~~~
                |                 cframe
          numba/_dispatcher.c:71:32: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
             71 |                tstate, tstate->frame, PyTrace_CALL, cfunc))     \
                |                                ^~~~~
          numba/_dispatcher.c:341:9: note: in expansion of macro ‘C_TRACE’
            341 |         C_TRACE(result, fn(PyCFunction_GET_SELF(cfunc), args, kws));
                |         ^~~~~~~
          numba/_dispatcher.c:82:50: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
             82 |                                  tstate, tstate->frame,         \
                |                                                  ^~~~~
          numba/_dispatcher.c:341:9: note: in expansion of macro ‘C_TRACE’
            341 |         C_TRACE(result, fn(PyCFunction_GET_SELF(cfunc), args, kws));
                |         ^~~~~~~
          numba/_dispatcher.c:90:44: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
             90 |                            tstate, tstate->frame,               \
                |                                            ^~~~~
          numba/_dispatcher.c:341:9: note: in expansion of macro ‘C_TRACE’
            341 |         C_TRACE(result, fn(PyCFunction_GET_SELF(cfunc), args, kws));
                |         ^~~~~~~
          numba/_dispatcher.c:344:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
            344 |         tstate->frame = frame->f_back;
                |                 ^~~~~
                |                 cframe
          numba/_dispatcher.c:344:30: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
            344 |         tstate->frame = frame->f_back;
                |                              ^~
          numba/_dispatcher.c: In function ‘Dispatcher_call’:
          numba/_dispatcher.c:512:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
            512 |     if (ts->use_tracing && ts->c_profilefunc) {
                |             ^~~~~~~~~~~
                |             tracing
          numba/_dispatcher.c: In function ‘call_cfunc’:
          numba/_dispatcher.c:354:1: warning: control reaches end of non-void function [-Wreturn-type]
            354 | }
                | ^
          error: Command "gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/home/lonskyne/.venv/lib/python3.11/site-packages/numpy/core/include -I/home/lonskyne/.venv/include -I/usr/include/python3.11 -c numba/_dispatcher.c -o build/temp.linux-x86_64-cpython-311/numba/_dispatcher.o" 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
      ╰─> [15 lines of output]
          running bdist_wheel
          /home/lonskyne/.venv/bin/python3 /tmp/pip-install-vwar_wlk/llvmlite_32b3722ce4c9449090e8462db3ca8d58/ffi/build.py
          LLVM version... 16.0.6
          
          Traceback (most recent call last):
            File "/tmp/pip-install-vwar_wlk/llvmlite_32b3722ce4c9449090e8462db3ca8d58/ffi/build.py", line 192, in <module>
              main()
            File "/tmp/pip-install-vwar_wlk/llvmlite_32b3722ce4c9449090e8462db3ca8d58/ffi/build.py", line 182, in main
              main_posix('linux', '.so')
            File "/tmp/pip-install-vwar_wlk/llvmlite_32b3722ce4c9449090e8462db3ca8d58/ffi/build.py", line 144, in main_posix
              raise RuntimeError(msg)
          RuntimeError: Building llvmlite requires LLVM 7.0.x, 7.1.x or 8.0.x, got '16.0.6'. Be sure to set LLVM_CONFIG to the right executable path.
          Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
          
          error: command '/home/lonskyne/.venv/bin/python3' 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
    ERROR: Could not build wheels for numba, llvmlite, which is required to install pyproject.toml-based projects

我正在使用 Arch Linux 和 python 3.11.6。 我尝试在使用 pip3 安装时使用

--use-pep517
。 我安装的numba版本是0.58.1 我安装的llvmlite版本是0.41.1 我还在 pacman 存储库中使用最新的 llvm 版本:llvm-16.0.6-1

python linux llvm numba llvmlite
1个回答
0
投票

解决方案是通过安装 python310 AUR 包来使用 Python 3.10,然后使用 venv 中的

python3.10 -m pip install ddsp
安装 ddsp。

© www.soinside.com 2019 - 2024. All rights reserved.