Import Error: cannot import name 'cv2' I want to begin exploring OpenCV in Python but I'm stuck at importing the package cv2. I have installed the package through pip3 install opencv-python and it got installed at this location - C:/Users/Kshitiz/AppData/Local/Programs/Python/Python36-32/Lib/site-packages.

When I'm trying to import cv2 using this:

import sys
sys.path.append('C:/Users/Kshitiz/AppData/Local/Programs/Python/Python36-32/Lib/site-packages')
import cv2


It gives the following error:

Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "C:/Users/Kshitiz/AppData/Local/Programs/Python/Python36-32/Lib/site-packages\cv2\__init__.py", line 7, in &lt;modul
e&gt;
    from . import cv2
ImportError: cannot import name 'cv2'


I have searched a lot but cannot find anything relevant. Please suggest what needs to be done.
According to the official documentation, if you had previous versions of opencv-python and opencv-contrib-python installed, you should consider removing them first:

 pip uninstall opencv-python
 opencv-contrib-python


Also, can you try installing them as sudo?

sudo -H pip install opencv-python