abdeladim-s / subsai

🎞️ Subtitles generation tool (Web-UI + CLI + Python package) powered by OpenAI's Whisper and its variants 🎞️
https://abdeladim-s.github.io/subsai/
GNU General Public License v3.0
1.15k stars 96 forks source link

ERROR: Failed building wheels for dtw-python...and webrtcvad #101

Open quopquai opened 5 months ago

quopquai commented 5 months ago

I get these errors when trying to install Subsai:

ERROR: Failed building wheel for dtw-python Building wheel for webrtcvad (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for webrtcvad (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-universal2-cpython-310 copying webrtcvad.py -> build/lib.macosx-10.9-universal2-cpython-310 running build_ext building '_webrtcvad' extension creating build/temp.macosx-10.9-universal2-cpython-310 creating build/temp.macosx-10.9-universal2-cpython-310/cbits creating build/temp.macosx-10.9-universal2-cpython-310/cbits/webrtc creating build/temp.macosx-10.9-universal2-cpython-310/cbits/webrtc/common_audio creating build/temp.macosx-10.9-universal2-cpython-310/cbits/webrtc/common_audio/signal_processing creating build/temp.macosx-10.9-universal2-cpython-310/cbits/webrtc/common_audio/vad clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DWEBRTC_POSIX -Icbits -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c cbits/pywebrtcvad.c -o build/temp.macosx-10.9-universal2-cpython-310/cbits/pywebrtcvad.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command '/usr/bin/clang' 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 webrtcvad Successfully built subsai whisper-timestamped Failed to build dtw-python webrtcvad ERROR: Could not build wheels for dtw-python, webrtcvad, which is required to install pyproject.toml-based projects

Any help would be appreciated! : (

abdeladim-s commented 5 months ago

Seems like there is no prebuilt wheel of webrtcvad available for your system.

You can either remove whisper-timestamped from the requirements and re-run the installation, or preferably build the docker image, you will get everything inside a container.

quopquai commented 5 months ago

Hey, thanks for the reply. I am trying to build the docker image now per the instructions but I've never cloned a github repository before or ever used docker. I've managed to do steps 1, 2 and 3 (I think?). Step 3 took like 15 minutes to complete! is that correct?

I'm kind of lost as to what to do next??? I'm not sure what step 4 means exactly or how to do it?! Any extra help for a complete beginner? Thanks!

Screenshot 2024-01-16 at 10 45 53
quopquai commented 5 months ago

....ok, so I just tried step 4. I assume it's what turns Subsai on. But, I got this error:

docker compose run -p 8501:8501 -v /Users/julisco/Desktop/Moomin:/Moomin subsai-webui
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
2024-01-16 02:05:59.834 INFO    matplotlib.font_manager: generated new fontManager
2024-01-16 02:06:19.285 WARNING streamlit.runtime.caching.cache_data_api: No runtime found, using MemoryCacheStorageManager

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.

Traceback (most recent call last):
  File "/subsai/src/subsai/webui.py", line 555, in <module>
    run()
  File "/subsai/src/subsai/webui.py", line 551, in run
    sys.exit(stcli.main())
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/streamlit/web/cli.py", line 209, in main_run
    _main_run(target, args, flag_options=kwargs)
  File "/opt/conda/lib/python3.10/site-packages/streamlit/web/cli.py", line 245, in _main_run
    bootstrap.run(file, command_line, args, flag_options)
  File "/opt/conda/lib/python3.10/site-packages/streamlit/web/bootstrap.py", line 397, in run
    _install_pages_watcher(main_script_path)
  File "/opt/conda/lib/python3.10/site-packages/streamlit/web/bootstrap.py", line 373, in _install_pages_watcher
    watch_dir(
  File "/opt/conda/lib/python3.10/site-packages/streamlit/watcher/path_watcher.py", line 153, in watch_dir
    return _watch_path(
  File "/opt/conda/lib/python3.10/site-packages/streamlit/watcher/path_watcher.py", line 128, in _watch_path
    watcher_class(
  File "/opt/conda/lib/python3.10/site-packages/streamlit/watcher/event_based_path_watcher.py", line 92, in __init__
    path_watcher.watch_path(
  File "/opt/conda/lib/python3.10/site-packages/streamlit/watcher/event_based_path_watcher.py", line 170, in watch_path
    folder_handler.watch = self._observer.schedule(
  File "/opt/conda/lib/python3.10/site-packages/watchdog/observers/api.py", line 301, in schedule
    emitter.start()
  File "/opt/conda/lib/python3.10/site-packages/watchdog/utils/__init__.py", line 92, in start
    self.on_thread_start()
  File "/opt/conda/lib/python3.10/site-packages/watchdog/observers/inotify.py", line 119, in on_thread_start
    self._inotify = InotifyBuffer(path, self.watch.is_recursive)
  File "/opt/conda/lib/python3.10/site-packages/watchdog/observers/inotify_buffer.py", line 37, in __init__
    self._inotify = Inotify(path, recursive)
  File "/opt/conda/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 167, in __init__
    Inotify._raise_error()
  File "/opt/conda/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 432, in _raise_error
    raise OSError(err, os.strerror(err))
OSError: [Errno 38] Function not implemented
Screenshot 2024-01-16 at 11 17 09
abdeladim-s commented 5 months ago

Hi @quopquai, Yes right, you just follow the steps, the image may take a while to build, Your fourth step is correct, But I can see that you get that error, which is weird for a docker image. Could you please tell me what OS are you using ?

quopquai commented 5 months ago

I'm on Mac OS Ventura 13.3 (22E252) ...using an Apple M2 Pro Chip

abdeladim-s commented 5 months ago

Ok, so I've searched a bit and seems like there is a bug in running streamlit with docker in mac, I have made a slight change to the docker file and hope it will fix this issue. Could you please redo the steps, I think it won't take as much time as the previous build. Let me know how it goes ?

quopquai commented 5 months ago

Ok, doing now...

quopquai commented 5 months ago
docker compose run -p 8501:8501 -v /Users/julisco/Desktop/Moomin:/media_files subsai-webui                                                          
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
2024-01-16 02:55:30.720 INFO    matplotlib.font_manager: generated new fontManager
2024-01-16 02:55:52.439 WARNING streamlit.runtime.caching.cache_data_api: No runtime found, using MemoryCacheStorageManager

  You can now view your Streamlit app in your browser.

  Network URL: http://172.19.0.2:8501
  External URL: http://133.32.234.23:8501
Screenshot 2024-01-16 at 11 57 06 Screenshot 2024-01-16 at 11 57 36

It looks like you've fixed it for me! Thank you very much! :))))))))

abdeladim-s commented 5 months ago

You are welcome :) Feel free to let me know if you find any other issues.