ctcdecode icon indicating copy to clipboard operation
ctcdecode copied to clipboard

Import Error

Open lizabelos opened this issue 6 years ago • 5 comments

Hi !

I can't import ctcdecode :

tbelos2@asus:~/socr$ python3
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctcdecode
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tbelos2/anaconda3/lib/python3.6/site-packages/ctcdecode/__init__.py", line 1, in <module>
    from ._ext import ctc_decode
  File "/home/tbelos2/anaconda3/lib/python3.6/site-packages/ctcdecode/_ext/ctc_decode/__init__.py", line 3, in <module>
    from ._ctc_decode import lib as _lib, ffi as _ffi
ImportError: /home/tbelos2/anaconda3/lib/python3.6/site-packages/ctcdecode/_ext/ctc_decode/_ctc_decode.abi3.so: undefined symbol: _Z17paddle_get_scorerddPKcS0_i
>>> 

lizabelos avatar Jul 04 '18 08:07 lizabelos

hello, have you solved the question?

ghost avatar Aug 24 '18 04:08 ghost

see https://github.com/HIT-SCIR/pyltp/issues/58

hukkai avatar Nov 01 '18 08:11 hukkai

try import torch before importing this package

yaxili96 avatar Mar 29 '19 15:03 yaxili96

I tried and am getting the same issue:

Traceback (most recent call last):
  File "/home/shamoon/pytorch-lstm-audio/submodules/deepspeech2/decoder.py", line 102, in __init__
    from ctcdecode import CTCBeamDecoder
  File "/home/shamoon/ctcdecode/ctcdecode/__init__.py", line 1, in <module>
    from ._ext import ctc_decode
ModuleNotFoundError: No module named 'ctcdecode._ext'

shamoons avatar Mar 23 '20 02:03 shamoons

In my case I had to go back to torch 1.0.1 to resolve it. My initial torch version was 1.7.0, and i deleted all the torch package and installed torch 1.0.1. Then reinstalled ctcdecode, i had to rename ctcdecode source directory to ctcdecode-1.0.2 or the ctcdecode library directory could not be create.

shaowc5 avatar Feb 18 '21 02:02 shaowc5