-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Installation Error - Failed building wheel for tokenizers #2831
Comments
Having the exact same issue on a Linux machine! |
Environment: macOS Mojave Ver 10.14.6
Result was that Transformers was not installed (not listed in pip freeze) This however should work - seems like you just won't get the the new tokenizers: |
@GDBSD I had the same issue on the same OS version and also tried pip and source. Your version specification worked. |
Had the same issue on MacOS Mojave when doing pip3 install. Tried pip2 install, it worked but I got another error when running my script telling me I should really be using python 3. I tried @GDBSD 's answer, but I got this error:
|
yes I had the same issue with |
Can you all run |
Hi, I had the same problem and resolved it by installing rust. For MacOS, I used "curl https://sh.rustup.rs -sSf | sh". I also found that it needed a nightly version of rust, so you have to specify that in the install options. |
Hi, I also had the same problem with my initial installation of the library. After some time, I realized that my anaconda version was on 32Bit. You can check your version with |
@Wild3d I can confirm after running your snippet that I am on a 64bit version |
@gardnerds after creating a new environment to try your solution that also worked for me. I didn't have rust installed before. It successfully built the wheel for tokenizers (PEP 517). |
@gardnerds also worked for me. Using python 3.7 and built from source using a clean conda env |
Install Python 64-bit instead of 32-bit solved my same issue. |
I was having the same issue on virtualenv over Mac OS Mojave. Managed to solve it and install Transformers 2.5.1 by manually install the last version of tokenizers (0.6.0) instead of 0.5.2 that is required in the transformer package. pip install tokenizers Git clone latest version of transformers: git clone https://github.com/huggingface/transformers Before running the installation edit transformers/setup.py and change requirement of tokenizers to 0.6.0 Line 93: install_requires=[ Then run as usual: cd transformers I assume that you could also skip the first step and just collect the package as you run the install. |
@dafraile That solves mine! Thank you very much! |
@dafraile That helps, thanks a lot! |
I managed to solve the issue by installing Rust compiler
|
This solution is working for me |
It works for me, thanks! |
@gardnerds, adding |
@dafraile Thanks a lot. It solves my problem |
@dafraile Thanks! It works! |
@AvivNavon Thanks ! Solved my problem too. (MacOS Mojave) |
worked for me on windows10 |
@akashp1712 facing the same issue is a deployment context, where it's not possible to install rust. Did you find a solution? |
Yes @bfelbo, I tried the below in requirements.txt and it worked but couldn't use it as Vercel have hard dependency of 150MB build. requirements.txt
|
Mac M1 Monterry. |
I have same problem how to solve? I have installed rust from here and now have different error windows 10 Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32 https://github.com/xashru/punctuation-restoration/blob/master/requirements.txt https://www.rust-lang.org/tools/install
|
|
I had the same problem when trying to create a dockerfile. I was able to solve using the solution of this issue.
|
|
i have the same with my windows 7 and python3.6.8.
then just installed what i needed:
have a nice day! |
Install rust sdk and reopen terminal / cmd / powershell |
I had this error when trying to install a specific version of |
while I am installing transformer==4.4, I am facing issue: Failed to build tokenizers. |
Hey @GuruPavanKalyan could you refrain from copy pasting your problem on unrelated issues? You should either create a new issue on the |
I have the same python version and the exactly same question. I am running on Mac 2. I tried to lower the version of transformers and rustc. Both did not work out. |
could you try to update to the latest tokenizers version? We published a release yesterday! |
Wow. It is working properly now!!! Thanks for the support. |
@ArthurZucker that is ok, when transformers==4.37.2,tokenizers is fixed!! |
Thanks! It looks good to me! |
I am facing error "ModuleNotFoundError: No module named 'abouchet' " so i tried installing pip install transformers==4.2 |
Sorry for the stupid question but how do you update tokenizers when installing transformers? I did a pip install tokenizers first and that went without issues but pip install transformers still fails. Fails hard on any of the specific transformers (transformer[tf-cpu] etc from the huggingface docs |
Mybe python version is not match with tokenizers library. |
Yes. Older version of tokenizers were not built for newer version of python. |
So basically it's transformers fault for not updating tokenizers?! pip install transformer worked at the end btw - pip install transformer[tf-cpu] did not |
No it's not |
🐛 Bug
Information
Model I am using (Bert, XLNet ...): N/A
Language I am using the model on (English, Chinese ...): N/A
The problem arises when using:
Problem arises in transformers installation on Microsoft Windows 10 Pro, version 10.0.17763
After creating and activating the virtual environment, installing transformers is not possible, because the following error occurs:
"error: can not find Rust Compiler"
"ERROR: Failed building wheel for tokenizers"
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed d
The tasks I am working on is:
[X ] transformers installation
To reproduce
Steps to reproduce the behavior:
Expected behavior
Installation of transformers should be complete.
Environment info
transformers
version: N/A - installation stepThe text was updated successfully, but these errors were encountered: