3

I have installed flair library via the following command

!pip install flair

but when i tries to import it, it will generate error like "ModuleNotFoundError: No module named 'flair'"

Code:

import torch
import numpy as np
from flair.data import Sentence
from flair.embeddings import TransformerDocumentEmbeddings
Juned Ansari
  • 5,035
  • 7
  • 56
  • 89

1 Answers1

2

install via the following command make sure you use --user option otherwise you will get a permission error in windows 10.

!pip install --user flair

after install flair you have to restart kernel in jupyter notebook

Juned Ansari
  • 5,035
  • 7
  • 56
  • 89