You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running "pip install smolagents[transformers]" on my mac failed. The error I received was "error: metadata-generation-failed" ... debugging found error is triggered when trying to build install the "accelerate" package.
I have fixed the problem by installing smolagents[torch] first, then smolagents[transformers]. So I propose to update smolagents pyproject.toml to install these dependencies in such order. I'm making a PR with such proposal for your review.
I'm running in a newly python virtual environment using venv. Python version 3.13. MacOS Sequoia 15.3.1.
Code to reproduce the error
Steps to reproduce:
0. Make sure your don't have Pytorch installed globally
You should see the error come up when trying to insteall "accelerate" python package
Error logs (if any)
(ai_agent) MacBook-Pro-8:~ USER$ pip install smolagents[transformers]
Requirement already satisfied: smolagents[transformers] in ./.python_venv/ai_agent/lib/python3.13/site-packages (1.10.0)
....[redacted for conciseness]...
Collecting accelerate (from smolagents[transformers])
Using cached accelerate-1.4.0-py3-none-any.whl.metadata (19 kB)
Collecting transformers<4.49.0,>=4.0.0 (from smolagents[transformers])
Using cached transformers-4.48.3-py3-none-any.whl.metadata (44 kB)
....[redacted for conciseness]...
INFO: pip is looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
Collecting accelerate (from smolagents[transformers])
Using cached accelerate-1.3.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.2.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.2.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.1.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.1.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.0.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.0.0-py3-none-any.whl.metadata (19 kB)
INFO: pip is still looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
Using cached accelerate-0.34.2-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.34.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.34.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.33.0-py3-none-any.whl.metadata (18 kB)
Collecting numpy>=1.26.0 (from pandas>=2.2.3->smolagents[transformers])
Using cached numpy-1.26.4.tar.gz (15.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [342 lines of output]
....[redacted for conciseness]...
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
Expected behavior
I expect smolagents[all] and smolagents[transformers] to install successfully.
Packages version:
smolagents==1.3.0
Additional context
I'm running in a newly python virtual environment using venv. Python version 3.13. MacOS Sequoia 15.3.1.
I have found a potential solution by switching the order of package installations in pyproject.toml. I'll open a PR for your consideration.
The text was updated successfully, but these errors were encountered:
Aim to fix bug where failure to install "smolagents[all]" and "smolagents[transformers]" are triggered by not having PyTorch installed first in a new python environment.
See huggingface#940 for details.
Describe the bug
Running "pip install smolagents[transformers]" on my mac failed. The error I received was "error: metadata-generation-failed" ... debugging found error is triggered when trying to build install the "accelerate" package.
I have fixed the problem by installing smolagents[torch] first, then smolagents[transformers]. So I propose to update smolagents pyproject.toml to install these dependencies in such order. I'm making a PR with such proposal for your review.
I'm running in a newly python virtual environment using venv. Python version 3.13. MacOS Sequoia 15.3.1.
Code to reproduce the error
Steps to reproduce:
0. Make sure your don't have Pytorch installed globally
Error logs (if any)
(ai_agent) MacBook-Pro-8:~ USER$ pip install smolagents[transformers]
Requirement already satisfied: smolagents[transformers] in ./.python_venv/ai_agent/lib/python3.13/site-packages (1.10.0)
....[redacted for conciseness]...
Collecting accelerate (from smolagents[transformers])
Using cached accelerate-1.4.0-py3-none-any.whl.metadata (19 kB)
Collecting transformers<4.49.0,>=4.0.0 (from smolagents[transformers])
Using cached transformers-4.48.3-py3-none-any.whl.metadata (44 kB)
....[redacted for conciseness]...
INFO: pip is looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
Collecting accelerate (from smolagents[transformers])
Using cached accelerate-1.3.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.2.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.2.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.1.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.1.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.0.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-1.0.0-py3-none-any.whl.metadata (19 kB)
INFO: pip is still looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while.
Using cached accelerate-0.34.2-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.34.1-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.34.0-py3-none-any.whl.metadata (19 kB)
Using cached accelerate-0.33.0-py3-none-any.whl.metadata (18 kB)
Collecting numpy>=1.26.0 (from pandas>=2.2.3->smolagents[transformers])
Using cached numpy-1.26.4.tar.gz (15.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [342 lines of output]
....[redacted for conciseness]...
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
Expected behavior
I expect smolagents[all] and smolagents[transformers] to install successfully.
Packages version:
smolagents==1.3.0
Additional context
I'm running in a newly python virtual environment using venv. Python version 3.13. MacOS Sequoia 15.3.1.
I have found a potential solution by switching the order of package installations in pyproject.toml. I'll open a PR for your consideration.
The text was updated successfully, but these errors were encountered: