T5Tokenizer requires the SentencePiece library but it was not found in your environment.

T5Tokenizer requires the SentencePiece library but it was not found in your environment.,第1张

出现错误: T5Tokenizer requires the SentencePiece library but it was not found in your environment.

问题出现是因为我要使用T5Tokenizer

from transformers import AdamW, T5ForConditionalGeneration, T5Tokenizer

出现如下问题:

解决方法:
第一步:确实用最新的pip 安装, 否则可能会出现错误

pip install --upgrade pip

第二步:安装报错的SentencePiece

pip install SentencePiece

问题解决

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/570776.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-04-09
下一篇2022-04-09

发表评论

登录后才能评论

评论列表(0条)

    保存