cywang97 / StreamingTransformer

Apache License 2.0
271 stars 42 forks source link

Question about ImportError: No module named sentencepiece #21

Open Genj1 opened 3 years ago

Genj1 commented 3 years ago

I run the script in the following command: ./run --stage 2 and the error is:

File "~/StreamingTransformer/egs/librispeech/asr1/../../../utils/spm_encode", line 14, in import sentencepiece as spm ImportError: No module named sentencepiece

But in ESPNet , there was no such error. I try to solve but failed in this way: https://github.com/espnet/espnet/issues/1656 Is there any solution? Thanks!!

Genj1 commented 3 years ago

torch_version=1.7.0 cuda_version=11.0 python_version=3.8.10

ZhaoRunning commented 2 years ago

Well this problem may be caused by the fourth line in path.sh, i.e., [ -f $KALDI_ROOT/tools/env.sh ] && . $KALDI_ROOT/tools/env.sh. So you can remove it in this project.