opencv import error ( undefined symbol)

asked 2018-06-13 06:55:22 -0500

System information:

Ubuntu 16.04, Anaconda 1.6.9, Python 3.6.4, libopencv 3.4.1, opencv 3.4.1, py-opencv 3.4.1.

Problem definition: I just upgraded my opencv to 3.4 through anaconda and found could not import.

The import error is: ImportError: anaconda3/lib/python3.6/site-packages/../../ undefined symbol: _ZNK6google8protobuf7Message25InitializationErrorStringB5cxx11Ev

edit retag flag offensive close merge delete


did you build the python wrappers ? opencv does not maintain any anaconda libs.

(and this one was build against an external protobuf so, which does not exist on your box)

((again, not an opencv problem, the anaconda maintainer $%& ed up.))

berak gravatar imageberak ( 2018-06-13 06:57:50 -0500 )edit

Thank you for your kind reply @berak. I am not an expert for this. So what would I suppose to do?

tengerye gravatar imagetengerye ( 2018-06-13 10:43:13 -0500 )edit

i have no idea.

  • ditch anaconda,and move to pypi ? (if you're the "lazy kind")
  • the recommended way of using cv2 is still: build it from src, so anything will fit, what you got on your box.*
berak gravatar imageberak ( 2018-06-13 11:42:12 -0500 )edit