DCNv2 icon indicating copy to clipboard operation
DCNv2 copied to clipboard

No module '_ext'

Open dhdimchev opened this issue 5 years ago • 4 comments

I have the issue when trying to run testcpu.py or testcuda.py this is the error message \FairMOT\DCNv2> python testcpu.py Traceback (most recent call last): File "testcpu.py", line 11, in from dcn_v2 import dcn_v2_conv, DCNv2, DCN File "E:\Dissertation\FairMOT\DCNv2\dcn_v2.py", line 13, in import _ext as _backend ModuleNotFoundError: No module named '_ext'

My OS is windows

dhdimchev avatar Nov 29 '20 19:11 dhdimchev

The following worked for me:

Copied the _ext.cpython-38-x86_64-linux-gnu.so file and named it to _ext.so

To import DCNv2 module from dcn_v2.py in a file outside the directory, I needed to change the import line in dcn_v2.py to: import directory_name._ext as _backend

mansi-k avatar Feb 07 '21 18:02 mansi-k

The following worked for me:

Copied the _ext.cpython-38-x86_64-linux-gnu.so file and named it to _ext.so

To import DCNv2 module from dcn_v2.py in a file outside the directory, I needed to change the import line in dcn_v2.py to: import directory_name._ext as _backend

Where did you find _ext.cpython-38-x86_64-linux-gnu.so file?

tarsh98 avatar Aug 17 '21 06:08 tarsh98

Maybe you can try this way: https://github.com/xingyizhou/CenterNet/issues/454#issuecomment-873534568

cliffsallow avatar Oct 08 '21 03:10 cliffsallow

under DCNv2's root path, there will be a file called _ext.cpython-38-x86_64-linux-gnu.so simply rename it to _ext.so will work. Notice that you may need to change the line 13 from import ._ext as _backend to import DCNv2._ext as _backend.

whq-hqw avatar May 30 '22 11:05 whq-hqw