Is there any solution about python exe error loading of "cv2" binary extensions. Check OpenCV installation.') windows

versions:

numpy-1.23.0
opencv-python-4.6.0.66
Python 3.10.5
here is the error message: *

Traceback (most recent call last): File “man.py”, line 8, in File “PyInstaller\loader\pyimod03_importers.py”, line 495, in exec_module File “cv2_init_.py”, line 181, in bootstrap() File “cv2_init_.py”, line 153, in bootstrap native_module = importlib.import_module(“cv2”) File “importlib_init_.py”, line 126, in import_module File “PyInstaller\loader\pyimod03_importers.py”, line 495, in exec_module
File “cv2_init_.py”, line 181, in bootstrap() File “cv2_init_.py”, line 76, in bootstrap raise ImportError(‘ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.’) ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.

i’ve tried many ways. program working from code. i can take executable file too. but not working.
any help would be appreciated.

Try using a different version of opencv, this worked for me.
For Python 3.10 I use version 4.5.5.64. Just pip uninstall your version and install the older version using
pip install opencv-python==4.5.5.64

hope this was helpfull

@kilincfaruk, Simon’s answer is supported by this StackOverflow answer that also says to try an older version of OpenCV.

Hi @gauthierbuttez. Welcome to discuss.python.org. Will you please start a new topic for your question? (And then delete your post here.)

This will keep the topics focused and more useful for future searches. :smiley: :+1:

Make sure to put it into the Users category. You can also flag it with Help if you would like to.

ok. i did it and remove my question from this topic.