0

我已经成功安装了 simpletransformers。为什么它不起作用?非常感谢您提前。

from simpletransformers.language_modeling import LanguageModelingModel

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-9-eb4f4fd6459f> in <module>
----> 1 from simpletransformers.language_modeling import LanguageModelingModel

~\anaconda3\lib\site-packages\simpletransformers\language_modeling\__init__.py in <module>
----> 1 from simpletransformers.config.model_args import LanguageModelingArgs
      2 from simpletransformers.language_modeling.language_modeling_model import LanguageModelingModel

~\anaconda3\lib\site-packages\simpletransformers\config\model_args.py in <module>
      6 import warnings
      7 
----> 8 from torch.utils.data import Dataset
      9 
     10 

ModuleNotFoundError: No module named 'torch'
4

1 回答 1

0

我用“pip install torch”回答了我自己的问题,并更新了 Microsoft C++ 阅读软件。:)))

于 2021-01-04T14:53:37.640 回答