jwyang / faster-rcnn.pytorch

A faster pytorch implementation of faster r-cnn
MIT License
7.7k stars 2.33k forks source link

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

Open stekau opened 4 years ago

stekau commented 4 years ago

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!

lxdo517 commented 4 years ago

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

lxdo517 commented 4 years ago

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

aCuria commented 4 years ago

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

dengandong commented 3 years ago

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