failed to import BertModel
# 📚 Migration

## Information

The version of my torch is 1.6.0. When I want to import BertModel from transformers, it raised an error: ModuleNotFoundError: No module named '_sentencepiece'
I firstly activate my envs and used 'conda install transformers'.
Please help me, how can I address this problem?
I don't know what your transformers version is, but from your error message, you should install `sentencepiece`: `pip install sentencepiece` or `conda install sentencepiece` with the appropriate channel (probably `conda-forge`)<|||||>Thank u very much, I have solved this problem. Your work is really remarkable.&nbsp;



---Original---
From: "Lysandre ***@***.***&gt;
Date: Fri, Apr 16, 2021 21:17 PM
To: ***@***.***&gt;;
Cc: ***@***.******@***.***&gt;;
Subject: Re: [huggingface/transformers] failed to import BertModel (#11280)




 
I don't know what your transformers version is, but from your error message, you should install sentencepiece: pip install sentencepiece or conda install sentencepiece with the appropriate channel (probably conda-forge)
 
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.<|||||>Happy to help!<|||||>The 