# Cannot download ViTModel

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 4, 2024, 11:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117 "2024-10-04T11:20:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dydavide](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dydavide](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdydavide)%5C
**Post date:** [October 4, 2024, 11:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117%2F1 "2024-10-04T11:20:08Z")

</div>

For reproducility you can try the following commands:

```auto
from transformers import ViTModel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'ViTModel' from 'transformers' (/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/ __init__.py). Did you mean: 'GPT2Model'?

```

Any idea?

**UPDATE:**  
uninstalling and reinstalling it (using PIP), I have now the 4.45.1 version installed.  
Running the same command above gives me the following error:

```auto
Traceback (most recent call last):
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1764, in _get_module
    return importlib.import_module("." + module_name, self. __name__ )
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/importlib/ __init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/models/ __init__.py", line 15, in <module>
    from . import (
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/models/mt5/ __init__.py", line 29, in <module>
    from ..t5.tokenization_t5 import T5Tokenizer
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/models/t5/tokenization_t5.py", line 23, in <module>
    import sentencepiece as spm
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/sentencepiece/ __init__.py", line 13, in <module>
    from . import _sentencepiece
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/sentencepiece/_sentencepiece.cpython-312-x86_64-linux-gnu.so)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1412, in _handle_fromlist
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1754, in __getattr__
    module = self._get_module(self._class_to_module[name])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/transformers/utils/import_utils.py", line 1766, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto because of the following error (look up to see its traceback):
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/anaconda/anaconda3/envs/transformers/lib/python3.12/site-packages/sentencepiece/_sentencepiece.cpython-312-x86_64-linux-gnu.so)

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 4, 2024, 11:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117%2F2 "2024-10-04T11:39:45Z")

</div>

pip install sentencepiece ?

---

<div class="post-metadata">

**Author:** ![dydavide](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dydavide](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdydavide)%5C
**Post date:** [October 4, 2024, 11:51am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117%2F3 "2024-10-04T11:51:50Z")

</div>

Almost…

```auto
pip install --upgrade sentencepiece

```

did the job

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 4, 2024, 12:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcannot-download-vitmodel%2F110117%2F4 "2024-10-04T12:06:47Z")

</div>

If it works, OK.
