question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error installing transformers 3.1.0

See original GitHub issue

Environment info

  • transformers version: 3.1.0
  • Platform: Darwin-19.6.0-x86_64-i386-64bit
  • Python version: 3.7.7
  • PyTorch version (GPU?): 1.6.0 (False)
  • Tensorflow version (GPU?): not installed (NA)
  • Using GPU in script?: No
  • Using distributed or parallel set-up in script?: No

Who can help

Information

Model I am using (Bert, XLNet …): pipeline(“zero-shot-classification”)

The problem arises when using: pip3 install transformers==“3.1.0”

The tasks I am working on is: Just installing the package to use zero-shot-classification

To reproduce

Steps to reproduce the behavior:

  1. pip3 install transformers==“3.1.0”

Alternatively:

  1. pip3 install tokenizers==“0.8.1.rc2”

Notes: It seems that the tokenizers version ‘0.8.1.rc2’ is the issue. I can install the system just fine on different systems by changing the version to ‘0.8.0’ in transformers/setup.py. Alternatively pip3 install transformers==“3.1.0” tokenizers==“0.8.0” seems to be a working method of installation, but tokenizers version “0.8.1.rc2” still has the error.

error: build failed /tmp/pip-build-env-mey29riz/overlay/lib/python3.6/site-packages/setuptools/dist.py:452: UserWarning: Normalizing ‘0.8.1.rc2’ to ‘0.8.1rc2’ warnings.warn(tmpl.format(**locals())) cargo rustc --lib --manifest-path Cargo.toml --features pyo3/extension-module --release --verbose – --crate-type cdylib error: cargo failed with code: 101 ERROR: Failed building wheel for tokenizers Running setup.py clean for tokenizers Failed to build tokenizers ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed directly

Expected behavior

The expected behaviour would be to install properly without error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
bluteaurcommented, Sep 18, 2020

I simply installed the transformer 3.0.0 version until they fix this problem. python3 -m pip install transformers==3.0.0

I need version 3.1.0 for the latest 0-shot pipeline. But the following fixed the problem that @alexuadler mentioned:

pip3 install tokenizers==“0.8.1” pip3 install transformers==“3.1.0” --no-dependencies

0reactions
stale[bot]commented, Nov 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — transformers 3.1.0 documentation - Hugging Face
Installation with pip​​ First you need to install one of, or both, TensorFlow 2.0 and PyTorch. Please refer to TensorFlow installation page and/or...
Read more >
HuggingFace Transformers not getting installed in VS Code
Another possible solution - is install Rust compiler, make a restart and try pip install again.
Read more >
transformers · PyPI
You should install Transformers in a virtual environment. If you're unfamiliar with Python virtual environments, check out the user guide.
Read more >
Install spaCy · spaCy Usage Documentation
Example. pip install spacy[lookups,transformers] ... transformers, Install spacy-transformers . ... as this can often lead to unexpected results and errors.
Read more >
error: could not build wheels for tokenizers - You.com | The AI ...
C:\Users\donhu>pip install transformers Collecting transformers ... Using cached transformers-3.1.0-py3-none-any.whl (884 kB) Requirement already satisfied, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found