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

ERROR: Could not build wheels for safetensors, which is required to install pyproject.toml-based projects[BUG] <title> #210

Closed
2 tasks done
aaronysl opened this issue Aug 17, 2023 · 7 comments

Comments

@aaronysl
Copy link

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

pip install -r requirements.txt 报错

期望行为 | Expected Behavior

No response

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:MAC OS
- Python: 3.10
- Transformers:
- PyTorch:2.0.1
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?

有没有遇到同样情况的

@CharlexChen
Copy link

我也遇到这种情况,楼主有解决方案了吗

@MehmetOzaslan
Copy link

Check this: huggingface/transformers#2831

Seems that we need a rust compiler to fix the issue.
Primary solution: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

@MehmetOzaslan
Copy link

If you want to get your feet wet quickly, I've had better luck using hosted services like google collab. It's a bit unfortunate that running these things locally can lead to issues like this. Too many random dependencies.

@hytting
Copy link

hytting commented Aug 24, 2023

Had the same issue and the following code worked well for me:

conda install -c conda-forge rust
git clone https://github.com/huggingface/safetensors
cd safetensors/bindings/python
pip install setuptools_rust
pip install -e .

source from: https://github.com/huggingface/safetensors

@yangapku
Copy link
Member

@aaronysl @CharlexChen @bugsebe Will it work fine if you try the commands @hytting just provided?

@lzxue
Copy link

lzxue commented Aug 25, 2023

@aaronysl @CharlexChen @bugsebe Will it work fine if you try the commands @hytting just provided?

I have resolved

@osm-zrl
Copy link

osm-zrl commented Jan 4, 2024

Had the same issue and the following code worked well for me:

conda install -c conda-forge rust git clone https://github.com/huggingface/safetensors cd safetensors/bindings/python pip install setuptools_rust pip install -e .

source from: https://github.com/huggingface/safetensors

this worked for me until the last command didn't work, so i tried to change my python version from 3.12 to 3.10 and it worked

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

No branches or pull requests

9 participants