Cannot import _cffi_backend in Python 3.6.0 (Anaconda)

I am trying to install warp-ctc for Pytorch. The installer requires that _cffi_backend to be available in my machine (Ubuntu 16.04). Although I have the file under my Anaconda (python 3.6.0) site packages, whenever I write the instruction:

import _cffi_backend

I get the following error:

ImportError: /home/bishwajit/anaconda3/lib/python3.6/site-packages/ undefined symbol: PySlice_AdjustIndices

I browsed a lot and many people have had this problem before. But they were importing torch when this problem occurred. I don’t have any problem importing torch though. The answers said to downgrade the torch version (to 0.1.10) which I did with no effect. Is there any way out?

My current pytorch version is: ‘0.2.0_4’

This seems to be unrelated to PyTorch:

Any solution to this…?

Use my docker file:

I tested it with import _cffi_backend and it works.

Finally I found the trick. It was all due to version conflicts. It doesn’t work with Python 3.6+ as far as I have seen it. Works great with Python 3.5.0 and 3.5.2. Thanks!