digitalbrain79 / pyyolo

Simple python wrapper for YOLO.
126 stars 65 forks source link

Error installing pyyolo #22

Open arevel190 opened 7 years ago

arevel190 commented 7 years ago

Hi all,

I am trying to install pyyolo but I found the below error when I run "python setup.py build". Please note that I already have gcc installed.

"module.c:152:17: error: non-void function 'PyInit_pyyolo' should return a value [-Wreturn-type] if (m == NULL) return; ^ 1 error generated. error: command 'gcc' failed with exit status 1"

Thanks.

tung1404 commented 7 years ago

I also see the same error module.c:136:3: error: non-void function 'pyyolo_test' should return a value [-Wreturn-type] import_array();

leonkding commented 6 years ago

I am the same situation with you, I wonder how to solve it

AmourDeMai commented 6 years ago

Same situation + 1

chrisquevedo commented 6 years ago

Hi! I solved using _import_array()

Solution found on: https://github.com/numpy/numpy/issues/10486

lesreaper commented 6 years ago

Unfortunately, there is no import_array anymore in the latest pull, which is what the solution mentioned above said to fix (unless I missed something), and I'm getting the same error on MacOSX.

module.c:160:17: error: non-void function 'PyInit_pyyolo' should return a value [-Wreturn-type] if (m == NULL) return;

Ideas?

takeru1205 commented 5 years ago

Hi! I could run sample.py line160 of /pyyolo/module.c change to this

m = PyModule_Create(&pyyolo_module);
if (m == NULL) return m;

and do README

before run sample.py I recommend you to change tiny-yolo to yolov3-tiny in the pyyolo directory

wget https://pjreddie.com/media/files/yolov3-tiny.weights

while installing weights you should change example.py

line 8,9 of example.py change to this

cfgfile = 'cfg/yolov3-tiny.cfg'
weightfile = '../yolov3-tiny.weights'

this idea is able to run example. But I don't care about other pictures.