#4367 Traceback (most recent call last):File "/Users/junyouchen/Desktop! pyvideotrans/.venv/lib/python3.10/site-packages/sound

51.75* Posted at: 3 hours ago 👁13

Traceback (most recent call last):
File "/Users/junyouchen/Desktop! pyvideotrans/.venv/lib/python3.10/site-
packages/soundfile.py", line 267, in
_snd = _ffi.dlopen('sndfile')
File "/Users/junyouchen/Desktop/ pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py",
", line 150, in dlopen
lib, function_cache = _make_ffi_libraryself,
name, flags)
File "/Users/junyouchen/Desktop/ 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/junyouchen/Desktop/ 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/junyouchen/Desktop/ pyvideotrans/videotrans/mainwin/ _main_win.py"
", line 484, in _set_default
self._bind_signal()
File "/Users/junyouchen/Desktop/ pyvideotrans/videotrans/mainwin/ _main_win.py", line 676, in _bind_signal self._open_winform('fn_peiyin')
File "/Users/junyouchen/Desktop/ pyvideotrans/videotrans/mainwin/ _main_win.py", line 750, in _open_winform return winform.get_win(name).openwin()
File "/Users/junyouchen/Desktop/
pyvideotrans/videotrans/winform/fn_peiyin.py",
line 187, in openwin
from videotrans.task._dubbing import
DubbingSrt
File "/Users/junyouchen/Desktop/ pyvideotrans/videotrans/task/_dubbing.py", line 13, in
from videotrans.task._rate import
TtsSpeedRate
File "/Users/junyouchen/Desktop/

1 Replies

这是因为系统中缺少 libsndfile 音频处理库导致 Python 的 soundfile 模块无法加载。

解决方案:

  1. 打开终端,使用 Homebrew 安装 libsndfile:

    brew install libsndfile
  2. 若尚未安装 FFmpeg(软件必需),也一并安装:

    brew install ffmpeg
  3. 安装完成后,重新运行软件。

请注意:macOS 上源码部署还需确保 Python 3.10 及 uv 包管理器已正确配置,详细步骤可参考下方文档。

请查阅相关文档:

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.

Related resource