# ModuleNotFoundError in Chapter 1

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%3E%5C
**Category:** Course\
**Created:** [June 26, 2023, 10:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657 "2023-06-26T22:26:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonym-hf](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tonym-hf](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftonym-hf)%5C
**Post date:** [June 26, 2023, 10:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%2F1 "2023-06-26T22:26:04Z")

</div>

I’m in Chapter 1, and (I think) I’ve followed the instructions for setting up my environment. My Python version is 3.10.11. I’m running a local Jupyter notebook (I do not get this error on Google Colab). When I try to execute:

`classifier = pipeline("sentiment-analysis")`

I get an error that summarizes as follows:

```auto
RuntimeError: Failed to import transformers.models.distilbert.modeling_tf_distilbert because of the following error (look up to see its traceback):
No module named 'keras.engine

```

What should I be looking at to fix this?

Thanks!

T

---

<div class="post-metadata">

**Author:** ![Abdelkareem](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abdelkareem/32/30422_2.png) [@Abdelkareem](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAbdelkareem)%5C
**Post date:** [June 26, 2023, 10:34pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%2F2 "2023-06-26T22:34:34Z")

</div>

```auto
pip install tensorflow

```

---

<div class="post-metadata">

**Author:** ![tonym-hf](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tonym-hf](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftonym-hf)%5C
**Post date:** [June 26, 2023, 10:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%2F3 "2023-06-26T22:59:48Z")

</div>

Thanks for the response! Unfortunately, this isn’t the issue. Tensorflow is installed (although it was not imported for this chapter at this point). If I do import it, it doesn’t change the error. FWIW, though, the version of TF that is installed is ‘2.13.0-rc1’.

Also, I’m on OS X, Ventura (13.3) M2 Max chip.

---

<div class="post-metadata">

**Author:** ![Abdelkareem](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abdelkareem/32/30422_2.png) [@Abdelkareem](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAbdelkareem)%5C
**Post date:** [June 27, 2023, 12:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%2F4 "2023-06-27T00:40:22Z")

</div>

maybe try to downgrade your latest tensorflow and keras into lower one! i had same issue with tensorflow the reason was for my os was using cuda 12 and tensorflow not supporting it! i think you may try downgrade 🙂

---

<div class="post-metadata">

**Author:** ![tonym-hf](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tonym-hf](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftonym-hf)%5C
**Post date:** [June 27, 2023, 4:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmodulenotfounderror-in-chapter-1%2F44657%2F5 "2023-06-27T04:08:06Z")

</div>

Thanks for the suggestion. I think that probably this is what I need, but it looks like Apple’s M2 architecture doesn’t really support older versions very well. I’ll keep experimenting. In the meantime, I can work through the course on Colab.
