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.

Can't import pipeline

See original GitHub issue
  • transformers 4.2
  • Platform: MacOS
  • Python version: 3.7.9
  • PyTorch version (GPU?): CPU
  • Tensorflow version (GPU?): CPU
  • Using GPU in script?: No
  • Using distributed or parallel set-up in script?: No
  • Pip Version: Latest

I can’t import the pipeline function:

from transformers import pipeline

Gives the following error:

File "<stdin>", line 1, in <module>
ImportError: cannot import name 'pipeline' from 'transformers' (unknown location)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
hassanzadehcommented, Feb 5, 2021

upgraded tf fixed it, thanks.

0reactions
fkoehlincommented, Mar 23, 2022

Same here, also installing TF in addition to PyTorch didn’t help…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not import pipeline from transformers - Stack Overflow
I have installed pytorch with conda and transformers with pip . I can import transformers without a problem but when I try to...
Read more >
ImportError: cannot import name 'pipeline' from 'transformers ...
Hi, I created an env with conda, installed TF, then installed PyTorch, then "pip install git+https://github.com/huggingface/transformers", but when I ran ...
Read more >
Can't import yml pipeline in to Azure DevOps pipeline
I have a copy of the existing and functioning yml pipeline in another folder, and I'm trying to import it so I can...
Read more >
[Example code]-Can not import pipeline from transformers
I have installed pytorch with conda and transformers with pip . I can import transformers without a problem but when I try to...
Read more >
Pipelines - Hugging Face
import datasets from transformers import pipeline from ... you cannot use `num_workers > 1` variable # to use multiple threads to preprocess data....
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