digitalbrain79 / pyyolo

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

pyyolo.so: undefined symbol: cvWaitKey #4

Open ghost opened 7 years ago

ghost commented 7 years ago

When running example.py got an error:

Traceback (most recent call last): File "example.py", line 1, in import pyyolo ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: cvWaitKey

XiomarG commented 7 years ago

I got the same problem. Have you resolved it yet?

XiomarG commented 7 years ago

i think the key is that you cannot turn on OpenCV in Makefile.

reinaldomaslim commented 7 years ago

i got the same error, even though i turned opencv=0 it still persists

rnunziata commented 7 years ago

Also getting this error in python3 also tried python2 same issue. Tried turning off OPENCV in Makefile for does not seem to resolve. It seem to be working now for me in python3 if I turn off OPENCV in Makefile. I must have been doing something else incorrect.

rnunziata commented 7 years ago

removed....

cbaziotis commented 7 years ago

Is there a solution with OPENCV=1? I can't get it to work.

rnunziata commented 7 years ago

You can use it in python just not when you compile pyyolo, its a shard lib problem.

sunsided commented 7 years ago

@reinaldomaslim I had the same problem. It appears that python setup.py install does not overwrite the already installed modules. If you delete the two files in your python module directory before the call, it'll work. That said, you might want to delete the build directory before building as well.

georoen commented 7 years ago

Hi @sunsided, can you please specify which two files you mean? Currently I'm removing pyyolo.so and pyyolo-0.1.egg-info in /usr/local/lib/python2.7/dist-packages/while trying to get this work repetitively... I am also rm -rf build as in instructions point 4. And I set OPENCV=1 since otherwise I get a different error saying ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: _ZGVbN2vv___pow_finite.

filipetrocadoferreira commented 7 years ago

I'm geting the same error as @georoen

sunsided commented 7 years ago

@georoen For me they are pyyolo.cpython-36m-x86_64-linux-gnu.so and pyyolo-0.1-py3.6.egg-info in dist-packages, but that looks right. If I don't delete these prior to install, it doesn't seem to copy anything new. Apart from that, for me it only works with OPENCV=0. I have to say that I did not rebuild pyyolo since my last comment 14 days ago, so maybe there are newer changes introducing the pow_finite problem. It appears to be related to glibc though - maybe try a newer/different compiler?

georoen commented 7 years ago

okay, unfortunately I'm very new to compiling stuff (I want to wrap yolo into R, so I can move on in my favorite language, but python would be okay as well).. This is how I gave it a new try: sudo rm /usr/local/lib/python2.7/dist-packages/pyyolo* Find which other compliers are available on my system with dpkg --list | grep compiler and use that instead: make CC=/usr/bin/gcc-6 with with OPENCV=0. However it still returns the same errors (both, also OPENCV=1 and also with ggc-5) on Ubuntu 17.04. Which newer/different compiler do you suggest @sunsided?

ni9elf commented 7 years ago

I got the same import error after installing: ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: cvWaitKey

I attempted another clean install which worked. The following steps were performed:

Configuration: Python 2.7.12 OpenCV 3.2.0

But the main issue is still not resolved since the installation is not going through with OpenCV support, i.e., with OPENCV=1 in the Makefile.