You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using torchaudio to load audio files, which under the hood uses ffmpeg. On MacOS with Apple Silicon, ffmpeg's libraries will be installed to /opt/homebrew/lib.
When I run my script regularly with Python's good old venv and python scripts/worker.py, torchaudio successfully finds ffmpeg in /opt/homebrew/lib. When I run my script with uv run worker, whereas worker is a defined script in pyproject.toml, torchaudio can't find ffmpeg and says that the search paths are:
I'm using torchaudio to load audio files, which under the hood uses ffmpeg. On MacOS with Apple Silicon, ffmpeg's libraries will be installed to /opt/homebrew/lib.
When I run my script regularly with Python's good old venv and
python scripts/worker.py
, torchaudio successfully finds ffmpeg in /opt/homebrew/lib. When I run my script withuv run worker
, whereasworker
is a defined script inpyproject.toml
, torchaudio can't find ffmpeg and says that the search paths are:$PROJECT_DIR/.venv/lib/python3.10/site-packages/torch/lib/libavutil.56.dylib
/usr/lib/libavutil.56.dylib
libavutil.56.dylib
/usr/local/lib/libavutil.56.dylib
/usr/lib/libavutil.56.dylib
(not sure why /usr/lib is duplicated; I'm just copying the output)
The file, however, is located at
/opt/homebrew/lib/libavutil.56.dylib
. Why is the dyld search path different when running my script viauv run
?The text was updated successfully, but these errors were encountered: