How does site-packages work with PyTorch and torchvision, given that neither of them get linked to outside their cellars? #5831
Unanswered
tedmiddleton
asked this question in
Everyday usage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
It's been a while since I've used homebrew python so I'm a bit confused about how this is supposed to work.
Most of the python packages that are available in homebrew seem to contain their own site-packages which then gets linked into the python site-packages directory. But Pytorch's recipe doesn't - it doesn't set up these links into the python site-package dir. Pytorch does have some .pth files, but again it leaves these unlinked inside the cellar.
As a result, torch can't be imported naively, so up until now I've been explicitly adding the PyTorch site-packages directory to my python path in my .bashrc, which is somewhat workable, but actually causes a lot of problems when combined with the (new?) homebrew policy of updating with every brew command - so I've had to also define HOMEBREW_NO_AUTO_UPDATE to avoid having to restart my tmux and my workspace ever time I execute a brew command and accidentally upgrade PyTorch.
Anyways, I installed torchvision and it seems to follow the same policy of not linking out of its cellar, which has me wondering if there's something I'm doing wrong. Am I missing something? Am I supposed to execute some new brew command to make this work properly, without the environment hacks?
Beta Was this translation helpful? Give feedback.
All reactions