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

When running project with uv run, homebrew-installed dynamic libraries on MacOS are not found. #7764

Open
tcwalther opened this issue Sep 28, 2024 · 0 comments

Comments

@tcwalther
Copy link

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:

  • $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 via uv run?

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

No branches or pull requests

1 participant