abdeladim-s / pywhispercpp

Python bindings for whisper.cpp
https://abdeladim-s.github.io/pywhispercpp/
MIT License
180 stars 26 forks source link

Install failed on Windows #43

Closed thewh1teagle closed 3 months ago

thewh1teagle commented 3 months ago
git clone https://github.com/abdeladim-s/pywhispercpp
cd pywhispercpp
python -m pip install --upgrade pip
python -m venv venv
venv\Scripts\activate
pip install .

Error:

        1>Checking Build System
        Building Custom Rule D:/pywhispercpp/whisper.cpp/CMakeLists.txt
        ggml.c
        ggml-alloc.c
        ggml-backend.c
        ggml-quants.c
        Generating Code...
        whisper.cpp
           Creating library D:/pywhispercpp/build/temp.win-amd64-cpython-39/Release/_pywhispercpp/whisper.cpp/Release/whisper.lib and object D:/pywhispercpp/build/temp.win-amd64-cpython-39/Release/_pywhispercpp/whisper.cpp/Release/whisper.exp
        whisper.vcxproj -> D:\pywhispercpp\build\temp.win-amd64-cpython-39\Release\_pywhispercpp\bin\Release\whisper.dll
        Building Custom Rule D:/pywhispercpp/CMakeLists.txt
        main.cpp
           Creating library D:/pywhispercpp/build/temp.win-amd64-cpython-39/Release/_pywhispercpp/Release/_pywhispercpp.lib and object D:/pywhispercpp/build/temp.win-amd64-cpython-39/Release/_pywhispercpp/Release/_pywhispercpp.exp
        Generating code
        Finished generating code
        _pywhispercpp.vcxproj -> D:\pywhispercpp\build\lib.win-amd64-cpython-39\_pywhispercpp.pyd
        Building Custom Rule D:/pywhispercpp/CMakeLists.txt
      error: can't copy 'build\lib.win-amd64-cpython-39\_pywhispercpp.cp39-win_amd64.pyd': doesn't exist or not a regular file
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pywhispercpp
Failed to build pywhispercpp
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pywhispercpp)

it failed to copy but the file is there with different name: _pywhispercpp.pyd Renaming the file manually and running pip install . again fix the BUILD issue, but then it doesn't find the pyd at runtime. Happen in Windows with python 3.9.0