#5128 Traceback (most recent call last): File "/Users/Zhuanz1/Documents/pyvideotrans-main/.venv/lib/python3.10/site-packages

212.107* Posted at: 2 hours ago

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

_snd = _ffi.dlopen('sndfile')

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

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

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

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/Zhuanz1/Documents/pyvideotrans-main/.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/Zhuanz1/Documents/pyvideotrans-main/sp.py", line 209, in

QTimer.singleShot(100, lambda: initialize_full_app(splash, app))

File "/Users/Zhuanz1/Documents/pyvideotrans-main/sp.py", line 146, in initialize_full_app

from videotrans.mainwin.main_win import MainWindow

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/mainwin/main_win.py", line 20, in

from videotrans import VERSION, translator, tts, recognition

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/translator/__init__.py", line 6, in

from videotrans.translator._base import BaseTrans

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/translator/_base.py", line 9, in

from videotrans.configure.base import BaseCon

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/configure/base.py", line 13, in

from videotrans.process.signelobj import GlobalProcessManager

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/process/__init__.py", line 2, in

from .tts_fun import qwen3tts_fun

File "/Users/Zhuanz1/Documents/pyvideotrans-main/videotrans/process/tts_fun.py", line 9, in

1 Replies

这是 macOS 上 Python 的 soundfile 库找不到系统级 libsndfile 导致的启动错误。

解决方案:通过 Homebrew 安装 libsndfile

brew install libsndfile

安装完成后重启 pyVideoTrans 即可。

如果安装后依然报错,尝试强制链接:

brew link libsndfile

若仍未解决,请确保 Homebrew 正确安装,然后重新安装 soundfile Python 包:

uv add soundfile  # 如果使用 uv
# 或
pip install soundfile

若问题依旧,请提供 logs/ 目录下最新日志的底部 30 行。

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. Dondate: ko-fi.com/jianchang512

Related resource