SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
756 stars 271 forks source link

ImportError under Pytorch 1.5 (nightly) #160

Open jerryzhang-ss opened 4 years ago

jerryzhang-ss commented 4 years ago

Hi. I am trying to link warp-ctc to pytorch preview version, but I got this error:

Traceback (most recent call last):
  File "chineseocr/train_ocr.py", line 14, in <module>
    from warpctc_pytorch import CTCLoss
  File "/home/jerry/anaconda3/envs/ocr_1.5/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-linux-x86_64.egg/warpctc_pytorch/__init__.py", line 6, in <module>
    from ._warp_ctc import *
ImportError: /home/jerry/anaconda3/envs/ocr_1.5/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-linux-x86_64.egg/warpctc_pytorch/_warp_ctc.cpython-36m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass

May I know how to solve this? Thanks for your help

YongjieYang-YY commented 4 years ago

The same issue with me. Do you know how to solve this problem?

Stonesjtu commented 4 years ago

Confirmed on pytorch 1.6.0 release.

I think the cpp extension API has some BC breaking changes.

I'm working on a patch on it, so stay tuned.

Stonesjtu commented 4 years ago

@jerryzhang-ss @YongjieYang-YY I solved this problem by re-compiling the pytorch binding after upgrading pytorch. Have you ever tried that before?