[Python] Error while installing whisper-cpp-python

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I'm running on:

    Ubuntu 22.04.5 LTS
    python 3.10.12
    cmake version 4.0.3


    I tried to install with: pip install whisper-cpp-python

    but getting error:

    Building wheels for collected packages: whisper-cpp-python Building wheel for whisper-cpp-python (pyproject.toml) ... error error: subprocess-exited-with-error

    × Building wheel for whisper-cpp-python (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [91 lines of output]

    --------------------------------------------------------------------------------
    -- Trying 'Ninja' generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.

    Not searching for unused variables given on the command line.

    -- The C compiler identification is GNU 11.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is GNU 11.4.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done (0.4s)
    -- Generating done (0.0s)
    -- Build files have been written to: /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying 'Ninja' generator - success
    --------------------------------------------------------------------------------

    Configuring Project
    Working directory:
    /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6/_skbuild/linux-x86_64-3.10/cmake-build
    Command:
    /tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/cmake/data/bin/cmake /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:pATH=/tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6/_skbuild/linux-x86_64-3.10/cmake-install -DPYTHON_VERSION_STRING:STRING=3.10.12 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:pATH=/tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPYTHON_INCLUDE_DIR:pATH=/usr/include/python3.10 -DPYTHON_LIBRARY:pATH=/usr/lib/x86_64-linux-gnu/libpython3.10.so -DPython_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPython_ROOT_DIR:pATH=/home/amitli/python_venvs/venvWhisperCPP -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:pATH=/usr/include/python3.10 -DPython3_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPython3_ROOT_DIR:pATH=/home/amitli/python_venvs/venvWhisperCPP -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:pATH=/usr/include/python3.10 -DCMAKE_MAKE_PROGRAM:FILEPATH=ninja -DCMAKE_BUILD_TYPE:STRING=Release

    Not searching for unused variables given on the command line.
    -- The C compiler identification is GNU 11.4.0
    -- The CXX compiler identification is GNU 11.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at vendor/whisper.cpp/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


    -- Configuring incomplete, errors occurred!
    Traceback (most recent call last):
    File "/tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 660, in setup
    env = cmkr.configure(
    File "/tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 354, in configure
    raise SKBuildError(msg)

    An error occurred while configuring with CMake.
    Command:
    /tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/cmake/data/bin/cmake /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:pATH=/tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6/_skbuild/linux-x86_64-3.10/cmake-install -DPYTHON_VERSION_STRING:STRING=3.10.12 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:pATH=/tmp/pip-build-env-h5693axl/overlay/lib/python3.10/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPYTHON_INCLUDE_DIR:pATH=/usr/include/python3.10 -DPYTHON_LIBRARY:pATH=/usr/lib/x86_64-linux-gnu/libpython3.10.so -DPython_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPython_ROOT_DIR:pATH=/home/amitli/python_venvs/venvWhisperCPP -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:pATH=/usr/include/python3.10 -DPython3_EXECUTABLE:pATH=/home/amitli/python_venvs/venvWhisperCPP/bin/python3 -DPython3_ROOT_DIR:pATH=/home/amitli/python_venvs/venvWhisperCPP -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:pATH=/usr/include/python3.10 -DCMAKE_MAKE_PROGRAM:FILEPATH=ninja -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
    /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6
    Working directory:
    /tmp/pip-install-77w6z33k/whisper-cpp-python_a0b2df45a9ee419fb855cbd372dff6c6/_skbuild/linux-x86_64-3.10/cmake-build
    Please see CMake's output for more information.

    [end of output]


    note: This error originates from a subprocess, and is likely not a problem with pip.

    How can I install whisper-cpp for python ?

    Continue reading...

Compartilhe esta Página