FastMaskRCNN icon indicating copy to clipboard operation
FastMaskRCNN copied to clipboard

ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol

Open ghost opened this issue 8 years ago • 3 comments

I'm just a beginner.when I run the train.py,there are some problems.How can I deal with the problem? Traceback (most recent call last): File "train/train.py", line 21, in import libs.nets.pyramid_network as pyramid_network File "train/../libs/nets/pyramid_network.py", line 10, in from libs.layers import anchor_encoder File "train/../libs/layers/init.py", line 9, in from .wrapper import anchor_decoder File "train/../libs/layers/wrapper.py", line 12, in from . import mask File "train/../libs/layers/mask.py", line 7, in import cv2 ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol: _ZN2cv11arrowedLineERNS_3MatENS_6Point_IiEES3_RKNS_7Scalar_IdEEiiid

ghost avatar Jul 19 '17 06:07 ghost

Run: pip3 install --upgrade opencv-python should fix it

chenzhuo1005 avatar Jul 23 '17 01:07 chenzhuo1005

Thank you...I was trying to install OpenCV3.3 on Ubuntu 14.04 with Python 3.4.3 and faced the error

.virtualenvs/cv2/lib/python3.4/site-packages/cv2.so: undefined symbol: _ZTIN2cv3dnn19experimental_dnn_v15LayerE

and doing pip3 install --upgrade opencv-python completed the import of cv2. Thank you.

Mageshpoondi avatar Dec 09 '17 09:12 Mageshpoondi

For addition, if you want to upgrade to specific version just run this command for example pip3 install --upgrade opencv-python==3.3.1.11

ivder avatar Feb 12 '19 07:02 ivder