parlance / ctcdecode

PyTorch CTC Decoder bindings
MIT License
829 stars 245 forks source link

ModuleNotFoundError: No module named 'ctcdecode._ext' #135

Open shamoons opened 4 years ago

shamoons commented 4 years ago
  File "/home/shamoon/pytorch-lstm-audio/submodules/deepspeech2/decoder.py", line 101, in __init__
    from ctcdecode import CTCBeamDecoder
  File "/home/shamoon/ctcdecode/ctcdecode/__init__.py", line 2, in <module>
    from ._ext import ctc_decode
ModuleNotFoundError: No module named 'ctcdecode._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "submodules/deepspeech2/transcribe.py", line 79, in <module>
    beam_width=args.beam_width, num_processes=args.lm_workers)
  File "/home/shamoon/pytorch-lstm-audio/submodules/deepspeech2/decoder.py", line 103, in __init__
    raise ImportError("BeamCTCDecoder requires paddledecoder package.")
ImportError: BeamCTCDecoder requires paddledecoder package.
lvxuan96 commented 4 years ago

I tested and found that the error occurs when running in the ctcdecode directory, but it will work in other directories.

pinyiw commented 4 years ago

I had the same issue and as @lvxuan96 said, cd out of ctcdecode directory fixes it.

janvainer commented 4 years ago

I tested and found that the error occurs when running in the ctcdecode directory, but it will work in other directories.

this worked for me too

NoCodeAvaible commented 3 years ago

@lvxuan96 do you mean that I have to cd out of the directory where ctcdecode has been installed?

ghost commented 3 years ago

@lvxuan96 do you mean that I have to cd out of the directory where ctcdecode has been installed?

Just had the issue and yes that's exactly that

ariefsaferman commented 3 years ago

How exactly to cd out and run decoder beam?