longcw / yolo2-pytorch

YOLOv2 in PyTorch
1.55k stars 420 forks source link

ModuleNotFoundError: No module named 'layers.reorg._ext.reorg_layer._reorg_layer' #54

Open happyjin opened 6 years ago

happyjin commented 6 years ago

Hi all: There is an error when I run: python demo.py

(myenv) lijins-MacBook-Pro:yolo2-pytorch-master lijin$ python demo.py Traceback (most recent call last): File "demo.py", line 6, in from darknet import Darknet19 File "/Users/lijin/Documents/GitHub/RL_tracking/yolo2-pytorch-master/darknet.py", line 8, in from layers.reorg.reorg_layer import ReorgLayer File "/Users/lijin/Documents/GitHub/RL_tracking/yolo2-pytorch-master/layers/reorg/reorg_layer.py", line 3, in from ._ext import reorg_layer File "/Users/lijin/Documents/GitHub/RL_tracking/yolo2-pytorch-master/layers/reorg/_ext/reorg_layer/init.py", line 3, in from ._reorg_layer import lib as _lib, ffi as _ffi ModuleNotFoundError: No module named 'layers.reorg._ext.reorg_layer._reorg_layer'

Could anyone tell me what is wrong with this error and how to deal with it? Thanks in advance!

longcw commented 6 years ago

Did you run sh make.sh first?

happyjin commented 6 years ago

Yes, I do. But then it comes an error: 'cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1' Could you please tell me how to fix the error and run the code

shirishr commented 6 years ago

exact same errors experienced Ubuntu 16.04 + python 3.6

libzzluo commented 6 years ago

The author says: "2. Build the reorg layer (tf.extract_image_patches)" then configure the .sh file the step 2 may miss some necessities.

sitongzhen commented 5 years ago

Do you resolve the problem? How to build the reorg layer? Can you tell me? Thank you very much.

sheepdnb commented 5 years ago

update on how this problem was solved?

EddieEduardo commented 5 years ago

Did you run sh make.sh

Did you run sh make.sh first?

Hi,how are you? You mean that if I want to directly run train.py I also have to run make.sh first ? Cause now I meet up with the seam problem shows that No module named 'layers.reorg._ext.reorg_layer._reorg_layer'.