#2045 OSError: cannot load library '/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/li

212.135* Posted at: 9 hours ago 👁9

Traceback (most recent call last):
File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/soundfile.py", line 267, in

_snd = _ffi.dlopen('sndfile')

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/herren/Downloads/pyvideotrans/videotrans/mainwin/_main_win.py", line 75, in _set_Ui_Text

from videotrans import VERSION, recognition, tts

File "/Users/herren/Downloads/pyvideotrans/videotrans/tts/__init__.py", line 26, in

from videotrans.tts._vits import VitsCNEN

File "/Users/herren/Downloads/pyvideotrans/videotrans/tts/_vits.py", line 16, in

import soundfile as sf

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/soundfile.py", line 276, in

_snd = _ffi.dlopen(_os.path.join(

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: cannot load library '/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file). Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/herren/Downloads/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib'


=
system:macOS-26.2-arm64-arm-64bit
version:v3.90
frozen:False
language:en
root_dir:/Users/herren/Downloads/pyvideotrans
Python: 3.10.19 (main, Dec 9 2025, 19:17:38) [Clang 21.1.4 ]

1 Replies

The error indicates that the libsndfile library is missing on your macOS system, which is required by the soundfile Python package used for audio processing. This is a common dependency issue for macOS users.

To fix this, you need to install libsndfile using Homebrew. Open your Terminal and run the following command:

brew install libsndfile

After the installation is complete, restart the pyVideoTrans application. The error should be resolved.

If you do not have Homebrew installed, you can install it first by running:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then proceed to install libsndfile as shown above.

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions