parlance / ctcdecode

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

import errors #92

Closed huangnengCSU closed 5 years ago

huangnengCSU commented 5 years ago

File "", line 1, in File "/home/clemson/miniconda3/envs/pytorch/lib/python3.6/site-packages/ctcdecode/init.py", line 1, in from ._ext import ctc_decode ImportError: /home/clemson/miniconda3/envs/pytorch/lib/python3.6/site-packages/ctcdecode/_ext/ctc_decode.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE

I have see the problem #73, it still doesn't work.

Rpersie commented 5 years ago

I find the problem ! You should import torch first. Then import ctcdecode. Anaconda3-dir/ctcdecode-master/installedfile$ python Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information.

import torch import ctcdecode

huangnengCSU commented 5 years ago

yeah, you are right. thanks a lot.

vaibhav0195 commented 5 years ago

hi @huangnengCSU I followed the instruction specified above and i am still unable to use it and im getting the error.


Traceback (most recent call last): File "", line 1, in File "ctcdecode/init.py", line 1, in from ._ext import ctc_decode ImportError: No module named _ext


I am on an ubuntu16.04 machine with cuda10 and cudnn7.2 . I have Installed pytorch using the pip and for the python 2.7 . Any help is appreciated. Thanks

huangnengCSU commented 5 years ago

hi @huangnengCSU I followed the instruction specified above and i am still unable to use it and im getting the error.

Traceback (most recent call last): File "", line 1, in File "ctcdecode/init.py", line 1, in from ._ext import ctc_decode ImportError: No module named _ext

I am on an ubuntu16.04 machine with cuda10 and cudnn7.2 . I have Installed pytorch using the pip and for the python 2.7 . Any help is appreciated. Thanks

https://blog.csdn.net/u011550545/article/details/87926995#

liudatutu commented 5 years ago

@vaibhav0195 I meet the same problem ,have you fixed it ?

vaibhav0195 commented 5 years ago

Hi @liudatutu yes I solved it, I dont remember the actual steps i took to solve it, but the error was resolved by changing my python to python3 or by changing the cuda version to cuda 9.2 I guess.

liudatutu commented 5 years ago

@vaibhav0195 my python version is python3,but cuda is 9.1,thanks,i will try it.

Rajasekhar06 commented 4 years ago

have you solved it @liudatutu

shiyuzh2007 commented 4 years ago

when I import ctcdecode by the following command:

import torch import ctcdecode I found I get the error "No module named _ext" when I run these command in the ctcdecode directory, and I found it can be bypassed in the other directory.