Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经通过以下命令安装了 fair 库
!pip install flair
但是当我尝试导入它时,它会产生类似“ModuleNotFoundError: No module named 'flair'”的错误
代码:
import torch import numpy as np from flair.data import Sentence from flair.embeddings import TransformerDocumentEmbeddings
通过以下命令安装确保您使用 --user 选项,否则您将在 Windows 10 中收到权限错误。
!pip install --user flair
安装 flair 后,您必须在 jupyter notebook 中重新启动内核