I'm getting an import error, does anyone know the solution?

Question:

hi I’m getting an import error, does anyone know the solution?

ImportError: Bindings generation error. Submodule name should always start with
a parent module name. Parent name: cv2.cv2. Submodule name: cv2

Asked By: nothenan Caly

||

Answers:

If you are using opencv-python version 4.6.0.66, try to downgrade to 4.5.5.64 version, on Pycharm you can do that by go to File->Setting->Python Interpreter-> Double-click on opencv-python version->check the specify version box, then choose older version.

Downgrade opencv also makes the auto-completion works again.

Answered By: ComNguoi

There is a bug here that seems to be what you are seeing:
https://github.com/opencv/opencv-python/issues/676

Answered By: David Dolson
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.