Error on importing Fastbook (v 0.0.16)

I installed fastbook using conda install -c fastbook fastbook earlier today.

on importing I am getting the following error ( snapshot attached)
import fastbook
C:\Users\Mohit\anaconda3\envs\Pytorch\lib\site-packages\ UserWarning: Missing sentencepiece - please run pip install 'sentencepiece<0.1.90'
except ModuleNotFoundError: warn("Missing sentencepiece - please run pip install 'sentencepiece<0.1.90'")

I am using
python : 3.8.8
fastbook : 0.0.16

Not sure how to resolve this error. Any help is welcome.


The error states it pretty well, you need to pip install sentencepiece. IE run pip install sentencepiece (from your terminal)

I was a little concerned about using pip because “conda” documentation advises against using “pip”. According to them using pip we run the risk of breaking the package/ installation. But luckily I found the equivalent conda command :slight_smile: will install the dependency right away.

Thank you once again!

1 Like