I tested the following command in python:
I put it in the file
b.py and run
python b.py. But I met with the following error:
Traceback (most recent call last): File "b.py", line 1, in <module> import cv2 File "/home/mypath/anaconda2/lib/python2.7/site-packages/cv2/__init__.py", line 9, in <module> from .cv2 import * ImportError: libXdmcp.so.6: cannot open shared object file: No such file or directory
What’s wrong with this? Thank you all for helping me!
Did you install opencv correctly? Also what OS are you using (e.g. Windows, Linux OS X etc.)
If you’re using windows – did you follow these steps?:
If you are using Fedora install Opencv by typing this command into the terminal:
sudo yum install numpy opencv*
The cause of the problem may be that you haven’t installed the dependencies:
Hope this helps!