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

Can't find torch candidate while building environment #26

Open
20Mhz opened this issue Dec 14, 2024 · 11 comments · May be fixed by #31
Open

Can't find torch candidate while building environment #26

20Mhz opened this issue Dec 14, 2024 · 11 comments · May be fixed by #31

Comments

@20Mhz
Copy link

20Mhz commented Dec 14, 2024

Failing due to missing dependency

ronaldv@MBP-de-Ronald LLM-Engineers-Handbook % poetry env use 3.11
Using virtualenv: /Users/ronaldv/Library/Caches/pypoetry/virtualenvs/llm-engineering-QmmB4sbR-py3.11
ronaldv@MBP-de-Ronald LLM-Engineers-Handbook % poetry install --without aws
Installing dependencies from lock file

Package operations: 18 installs, 0 updates, 0 removals

  - Installing torch (2.4.0): Failed

  RuntimeError

  Unable to find installation candidates for torch (2.4.0)

  at ~/Library/Application Support/pypoetry/venv/lib/python3.11/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│

Cannot install torch.
@20Mhz
Copy link
Author

20Mhz commented Dec 15, 2024

This seems to be related to PyTorch dropping support for Intel Macs, still looking for a work around

@ryan-mcdonough
Copy link

ryan-mcdonough commented Dec 17, 2024

This also happens on my M1 Macbook Pro.

I found changing the .lock file Torch version from 2.4.0 to 2.2.2 allows the install to complete, though not yet sure if this will cause further issues down the line.

@robot010
Copy link

same here for mac intel core i7

@iusztinpaul
Copy link
Collaborator

is this issue resolved? @20Mhz @ryan-mcdonough @robot010

would love to fix it for everyone

@ryan-mcdonough
Copy link

@iusztinpaul when torch is set to 2.2.2 then it works as expected.

@jpitagc
Copy link

jpitagc commented Jan 2, 2025

Hi, have no experience with poetry. ¿How should the poetry.lock file change to force 2.2.2 version?

@20Mhz
Copy link
Author

20Mhz commented Jan 2, 2025

@jpitagc

ronaldv@MacBook-Pro-de-Ronald LLM-Engineers-Handbook % grep  -A2 -B2 'name = "torch' poetry.lock  -n 
6541-  
6542-[[package]]. 
6543:name = "torch"
6544-version = "2.2.2"
6545-description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"

@iusztinpaul I can confirm this get us past the installation, but have not run anything useful yet.

@jpitagc
Copy link

jpitagc commented Jan 2, 2025

¿Files dont need to be updated? And corresponding hashes?
files = [ {file = "torch-2.4.0-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:4ed94583e244af51d6a8d28701ca5a9e02d1219e782f5a01dd401f90af17d8ac"}, {file = "torch-2.4.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:c4ca297b7bd58b506bfd6e78ffd14eb97c0e7797dcd7965df62f50bb575d8954"}, {file = "torch-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:2497cbc7b3c951d69b276ca51fe01c2865db67040ac67f5fc20b03e41d16ea4a"}, {file = "torch-2.4.0-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:685418ab93730efbee71528821ff54005596970dd497bf03c89204fb7e3f71de"}, {file = "torch-2.4.0-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:e743adadd8c8152bb8373543964551a7cb7cc20ba898dc8f9c0cdbe47c283de0"}, {file = "torch-2.4.0-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:7334325c0292cbd5c2eac085f449bf57d3690932eac37027e193ba775703c9e6"}, {file = "torch-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:97730014da4c57ffacb3c09298c6ce05400606e890bd7a05008d13dd086e46b1"}, {file = "torch-2.4.0-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:f169b4ea6dc93b3a33319611fcc47dc1406e4dd539844dcbd2dec4c1b96e166d"}, {file = "torch-2.4.0-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:997084a0f9784d2a89095a6dc67c7925e21bf25dea0b3d069b41195016ccfcbb"}, {file = "torch-2.4.0-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:bc3988e8b36d1e8b998d143255d9408d8c75da4ab6dd0dcfd23b623dfb0f0f57"}, {file = "torch-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:3374128bbf7e62cdaed6c237bfd39809fbcfaa576bee91e904706840c3f2195c"}, {file = "torch-2.4.0-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:91aaf00bfe1ffa44dc5b52809d9a95129fca10212eca3ac26420eb11727c6288"}, {file = "torch-2.4.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cc30457ea5489c62747d3306438af00c606b509d78822a88f804202ba63111ed"}, {file = "torch-2.4.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:a046491aaf96d1215e65e1fa85911ef2ded6d49ea34c8df4d0638879f2402eef"}, {file = "torch-2.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:688eec9240f3ce775f22e1e1a5ab9894f3d5fe60f3f586deb7dbd23a46a83916"}, {file = "torch-2.4.0-cp38-none-macosx_11_0_arm64.whl", hash = "sha256:3af4de2a618fb065e78404c4ba27a818a7b7957eaeff28c6c66ce7fb504b68b8"}, {file = "torch-2.4.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:618808d3f610d5f180e47a697d4ec90b810953bb1e020f424b2ac7fb0884b545"}, {file = "torch-2.4.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:ed765d232d23566052ba83632ec73a4fccde00b4c94ad45d63b471b09d63b7a7"}, {file = "torch-2.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:a2feb98ac470109472fb10dfef38622a7ee08482a16c357863ebc7bc7db7c8f7"}, {file = "torch-2.4.0-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:8940fc8b97a4c61fdb5d46a368f21f4a3a562a17879e932eb51a5ec62310cb31"}, ]

@jpitagc
Copy link

jpitagc commented Jan 2, 2025

Solved by

poetry lock

poetry add torch==2.2.2 --lock

and finally

poetry install --without aws

@20Mhz
Copy link
Author

20Mhz commented Jan 2, 2025

I believe I used poetry lock --no-update, but your method seems proper.

@ryanmcdonough ryanmcdonough linked a pull request Jan 2, 2025 that will close this issue
@iusztinpaul
Copy link
Collaborator

Amazing. Thank you for your support 🙏

@ryan-mcdonough @jpitagc @20Mhz

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

Successfully merging a pull request may close this issue.

5 participants