whai362 / PSENet

Official Pytorch implementations of PSENet.
Apache License 2.0
1.17k stars 344 forks source link

有没有遇到这个问题的呀 ImportError: /opt/data/private/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv #97

Open hetianduan opened 4 years ago

hetianduan commented 4 years ago

make: Leaving directory '/opt/data/private/PSENet/pse' Traceback (most recent call last): File "test_ic15.py", line 19, in from pse import pse File "/opt/data/private/PSENet/pse/init.py", line 11, in from .adaptor import pse as cpse ImportError: /opt/data/private/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv

JiaquanYe commented 4 years ago

I have met this situation, too

jiangzz1628 commented 4 years ago

解决了吗

hetianduan commented 4 years ago

解决了吗 编译安装opencv

jun214384468 commented 4 years ago

解决了吗 编译安装opencv

你好,我安装了opencv3.4.2 但是还是报这个错,主要是在python中 pse/init.py中这一句代码就有红线提示from .adaptor import pse as cpse

Magic-OO commented 4 years ago

请问有人解决了这个问题了吗?求解答啊

waxz commented 4 years ago

https://stackoverflow.com/questions/51308292/swig-linker-undefined-symbol-zn2cv8fastfreeepv-cvfastfreevoid You have to pass libraries and library-paths to the build-process by using arguments libraries and library_dirs

ext = Extension(....
                libraries=["opencv_xfeatures2d", "opencv_features2d", 
                           "opencv_highgui", "opencv_core"],
                library_dirs=['/usr/local/lib']
                )
buptlihang commented 3 years ago

You may not get all the information related to the compilation of opencv, try to run

apt-get install pkg-config

Then delete adaptor.so and recompile