Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Update pyproject.toml #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

faceyacc
Copy link

Ran into a Unable to find installation candidates for torch (2.1.2+cpu) error on Macbook (Intel) when not specifying platform key (i.e. torch = { platform = "linux", version = "2.0.1+cpu", source = "torch-cpu" })

@iusztinpaul
Copy link
Owner

Thanks for contributing to the course @faceyacc

Before merging it, I have a few questions.

What happens if you want to install it for a different platform? e.g. darwin?

@faceyacc
Copy link
Author

Installing for different platforms requires you to use a list to specify the source for each dependency. I realize this solution may not be ideal, but has worked for me, furthermore I realize that this has been a know issue with Poetry, so I assume others may have ran into this issue with following along with course. The following works for me:

...
torch = [
{platform = "win32", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "linux", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "darwin", version = "2.0.1", source = "pypi"},
]
...

Link to issues #8106 and #4231.

@iusztinpaul
Copy link
Owner

Thank you for highlighting this.

Have you tested with these modifications?

torch = [
{platform = "win32", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "linux", version = "2.0.1+cpu", source = "torch-cpu"},
{platform = "darwin", version = "2.0.1", source = "pypi"},
]

I know others who had issues installing Torch with Poetry on MacOS. Maybe this will fix it.

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

Successfully merging this pull request may close these issues.

2 participants