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

Error re: "unable to find libwhisper" when running llama-assistant from the command line #6

Open
adhulipa opened this issue Oct 5, 2024 · 1 comment

Comments

@adhulipa
Copy link

adhulipa commented Oct 5, 2024

~►llama-assistant                                                                                                                 (base) 113.203s 15:13

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/bin/llama-assistant", line 5, in <module>
    from llama_assistant.main import main
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/main.py", line 5, in <module>
    from llama_assistant.llama_assistant import LlamaAssistant
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/llama_assistant.py", line 49, in <module>
    from llama_assistant.speech_recognition_thread import SpeechRecognitionThread
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/llama_assistant/speech_recognition_thread.py", line 9, in <module>
    from pywhispercpp.model import Model
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pywhispercpp/model.py", line 14, in <module>
    import _pywhispercpp as pw
ImportError: dlopen(/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/_pywhispercpp.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libwhisper.1.dylib
  Referenced from: <BF3201C1-7D2D-33A4-8231-2370CFD402A7> /opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/_pywhispercpp.cpython-312-darwin.so
  Reason: tried: '/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/pv/bhts_8cx5z90483yx_04qfdh0000gn/T/pip-req-build-y46w04f8/build/lib.macosx-11.1-arm64-cpython-312/libwhisper.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/libwhisper.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/bin/../lib/libwhisper.1.dylib' (no such file)

here's everything I tried to fix the issue

llama-assistant

brew install ffmpeg

pip install pywhispercpp

pip install whisper-cpp-python

pip install --global-option='build_ext' \
    --global-option='-I/usr/local/include' \
    --global-option='-L/usr/local/lib' \
    pyaudio

python -m llama_assistant.main

pip install libwhisper
brew install libwhisper
pip uninstall llama-cpp-python -y
CMAKE_ARGS="-DGGML_METAL=on" pip install -U llama-cpp-python --no-cache-dir

xcode-select -p
pip install pyaudio
pip install git+https://github.com/vietanhdev/pywhispercpp.git
pip install llama-assistant

brew install portaudio


@vietanhdev
Copy link
Member

Hi @adhulipa ,
You can install pywhispercpp by this command to fix this problem.

git clone https://github.com/vietanhdev/pywhispercpp.git
cd pywhispercpp
pip install .

However, in the latest version on main, I replaced pywhispercpp with whispercpp.py.
Please check the newest code to see if it helps.
Thank you!

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

No branches or pull requests

2 participants