Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for installation of torch and torchvision on macOS (#1125)
**Title:** Fix for installation of `torch` and `torchvision` on macOS **Summary:** After installing poetry (version 1.8.3) on macOS and running `make environment`, you get the following error. Fixing this error will lead to a similar one for `torchvision`. ``` - Installing torch (1.13.1+cpu): Failed RuntimeError Unable to find installation candidates for torch (1.13.1+cpu) at ~/.local/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/installation/chooser.py:74 in choose_for 70│ 71│ links.append(link) 72│ 73│ if not links: → 74│ raise RuntimeError(f"Unable to find installation candidates for {package}") 75│ 76│ # Get the best link 77│ chosen = max(links, key=lambda link: self._sort_key(package, link)) 78│ ``` This is because the installer is using the `+cpu` version (despite the fact that the non `+cpu` version is in `pyproject.toml`). Specifying the source seems to fix the issue and the installer proceeds without error. **Relevant references:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Rashid N H M <[email protected]>
- Loading branch information