faster-rcnn.pytorch icon indicating copy to clipboard operation
faster-rcnn.pytorch copied to clipboard

Import _C - ImportError: DLL load failed - Branch: pytorch-1.0

Open stekau opened this issue 4 years ago • 4 comments

I tried to run the demo.py and got an import error message.

python demo.py

Traceback (most recent call last): File "demo.py", line 32, in from model.roi_layers import nms File "C:\Users\AI\PycharmProjects\faster-rcnn.pytorch\lib\model\roi_layers_init_.py", line 3, in from .nms import nms File "C:\Users\AI\PycharmProjects\faster-rcnn.pytorch\lib\model\roi_layers\nms.py", line 3, in from model import _C ImportError: DLL load failed: The specified module could not be found.

What I did so far is to run the lib/setup.py and got the lib/model/_C.cp37-win_amd64.pyd file. After running the demo.py I got the error mentioned above. Its seems there is no module called '_C'. Does somebody have any recommendations?

Thanks!

stekau avatar Jun 03 '20 14:06 stekau

为什么之前的人们没有遇到这个问题

lxdo517 avatar Aug 09 '20 14:08 lxdo517

我也是同样的问题,好久了

lxdo517 avatar Aug 09 '20 14:08 lxdo517

I got the same error, made it work by using: requirements.txt: torch==1.4.0 torchvision==0.5.0

If someone has a fix using the latest pytorch please do comment

aCuria avatar Sep 16 '20 10:09 aCuria

can _C be directly imported? I mean in config.py it is __C rather than _C

dengandong avatar Aug 27 '21 10:08 dengandong