# Transformers suddenly complaining about pytorch?

**URL:** <https://discuss.huggingface.co/t/transformers-suddenly-complaining-about-pytorch/8936>\
**Category:** 🤗Transformers\
**Created:** [August 3, 2021, 12:42pm UTC](https://discuss.huggingface.co/t/transformers-suddenly-complaining-about-pytorch/8936 "2021-08-03T12:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olaffson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/olaffson/32/2416_2.png) [@olaffson](https://discuss.huggingface.co/u/olaffson)\
**Post date:** [August 3, 2021, 12:42pm UTC](https://discuss.huggingface.co/t/transformers-suddenly-complaining-about-pytorch/8936/1 "2021-08-03T12:42:48Z")

</div>

Hello the team,

Huggingface is suddenly complaining about `pytorch` … but I have been only using `tensorflow` all along so far! Do you know what could cause this issue?

```auto
from transformers import AutoTokenizer, AutoModelForSequenceClassification
  
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")

model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
ImportError: 
AutoModelForSequenceClassification requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.

```

Thanks!

---

<div class="post-metadata">

**Author:** ![ehalit](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ehalit/32/28854_2.png) [@ehalit](https://discuss.huggingface.co/u/ehalit)\
**Post date:** [August 3, 2021, 12:57pm UTC](https://discuss.huggingface.co/t/transformers-suddenly-complaining-about-pytorch/8936/2 "2021-08-03T12:57:28Z")

</div>

If you want to use tensorflow models, try `TFAutoModelForSequenceClassification` module.

---

<div class="post-metadata">

**Author:** ![olaffson](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/olaffson/32/2416_2.png) [@olaffson](https://discuss.huggingface.co/u/olaffson)\
**Post date:** [August 3, 2021, 12:58pm UTC](https://discuss.huggingface.co/t/transformers-suddenly-complaining-about-pytorch/8936/3 "2021-08-03T12:58:41Z")

</div>

just found it, actually. Thanks!
