# Unable to import Hugging Face transformers

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-import-hugging-face-transformers%2F2900%3E%5C
**Category:** 🤗Transformers\
**Created:** [December 20, 2020, 7:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-import-hugging-face-transformers%2F2900 "2020-12-20T19:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlqnguyen](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tlqnguyen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftlqnguyen)%5C
**Post date:** [December 20, 2020, 7:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-import-hugging-face-transformers%2F2900%2F1 "2020-12-20T19:25:45Z")

</div>

I have been using transformers fine up until today. However, when I imported the package today, I received this error message:

```auto
In Transformers v4.0.0, the default path to cache downloaded models changed from '~/.cache/torch/transformers' to '~/.cache/huggingface/transformers'. Since you don't seem to have overridden and '~/.cache/torch/transformers' is a directory that exists, we're moving it to '~/.cache/huggingface/transformers' to avoid redownloading models you have already in the cache. You should only see this message once.

Error: Destination path '/home/user/.cache/huggingface/transformers/transformers' already exists

```

I have tried to install and uninstall the package but still unable to make it work.

Any suggestions to fix this would be really appreciated.

---

<div class="post-metadata">

**Author:** ![yusukemori](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yusukemori/32/23302_2.png) [@yusukemori](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fyusukemori)%5C
**Post date:** [December 21, 2020, 5:01am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-import-hugging-face-transformers%2F2900%2F2 "2020-12-21T05:01:39Z")

</div>

> [@tlqnguyen](#):
>
> `Error: Destination path '/home/user/.cache/huggingface/transformers/transformers' already exists`

It seems you already have `/home/user/.cache/huggingface/transformers/transformers`, and `transformers` v4 tried to make `~/.cache/huggingface/transformers` and failed.  
How about `mv` (rename) the `/home/user/.cache/huggingface/transformers/` to some temporary name and retry `import transformers`? (If I were you, I would not delete the directory, but rename it and keep it for now, just in case.)

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [December 21, 2020, 6:01pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-import-hugging-face-transformers%2F2900%2F3 "2020-12-21T18:01:38Z")

</div>

This is also fixed in the latest version.
