본문 바로가기
IT

라마 에러 처리 - 라이브러리 없음

by 달남 2024. 10. 24.

아래 에러는 라이브러리가 없을 때 나타나는 에러임

Traceback (most recent call last):
  File "e:\Llama\test 20241021,.py", line 6, in <module>
    tokenizer = LlamaTokenizer.from_pretrained(model_name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1637, in __getattribute__
    requires_backends(cls, cls._backends)
  File "C:\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1625, in requires_backends
    raise ImportError("".join(failed))
ImportError:
LlamaTokenizer requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.

댓글