pyyolo icon indicating copy to clipboard operation
pyyolo copied to clipboard

Error installing pyyolo

Open arevel190 opened this issue 8 years ago • 6 comments

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.

arevel190 avatar Jul 19 '17 21:07 arevel190

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

tung1404 avatar Aug 05 '17 07:08 tung1404

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

leonkding avatar Sep 08 '17 21:09 leonkding

Same situation + 1

AmourDeMai avatar Sep 21 '17 01:09 AmourDeMai

Hi! I solved using _import_array()

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

chrisquevedo avatar Apr 15 '18 12:04 chrisquevedo

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?

lesreaper avatar Jun 22 '18 21:06 lesreaper

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.

takeru1205 avatar Sep 06 '18 03:09 takeru1205