# ImportError: cannot import name 'pipeline' from 'transformers'

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 4, 2024, 10:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797 "2024-02-04T10:14:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KushwanthK](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@KushwanthK](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKushwanthK)%5C
**Post date:** [February 4, 2024, 10:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797%2F1 "2024-02-04T10:14:43Z")

</div>

I already included transformers in stream lit app with requirements.txt

ImportError: cannot import name ‘pipeline’ from ‘transformers’ (/home/user/.local/lib/python3.10/site-packages/transformers/ **init**.py)  
in huggingface streamlit app

---

<div class="post-metadata">

**Author:** ![CKeibel](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ckeibel/32/55416_2.png) [@CKeibel](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FCKeibel)%5C
**Post date:** [February 4, 2024, 7:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797%2F2 "2024-02-04T19:10:05Z")

</div>

> [@KushwanthK](#):
>
> ImportError: cannot import name ‘pipeline’ from ‘transformers’

Hi @KushwanthK!  
Maybe there is an issue with the version of transformers you have installed?  
Which version are you using?

```auto
# get transformers version
import transformers
print(transformers. __version__ )

```

To upgrade your version run:

```auto
python -m pip install -U transformers

```

---

<div class="post-metadata">

**Author:** ![KushwanthK](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@KushwanthK](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKushwanthK)%5C
**Post date:** [February 4, 2024, 9:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797%2F3 "2024-02-04T21:05:14Z")

</div>

I am using transformers==4.28.0  
This was working in my local google colab but not in hugging faces

---

<div class="post-metadata">

**Author:** ![CKeibel](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ckeibel/32/55416_2.png) [@CKeibel](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FCKeibel)%5C
**Post date:** [February 5, 2024, 7:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimporterror-cannot-import-name-pipeline-from-transformers%2F71797%2F4 "2024-02-05T07:14:31Z")

</div>

Mhh could you share the contents of your `requirements.txt` so I could try to reproduce the error on my machine?
