close

[Fixed] ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’

Today We are Going To Solve ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’ in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’ Error?

  1. How to Fix ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’ Error?

    To Fix ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’ Error just Install opencv-python-headless 4.1.2.30. First of all, you have to just uninstall opencv-python-headless by using the below command: pip uninstall opencv-python-headless and then install opencv-python-headless 4.1.2.30. And you can use the following command for that. pip install opencv-python-headless==4.1.2.30
    And your error will be solved.

  2. ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’

    To Fix ImportError: cannot import name ‘_registerMatType’ from ‘cv2.cv2’ Error just Install opencv-python-headless 4.1.2.30. First of all, you have to just uninstall opencv-python-headless by using the below command: pip uninstall opencv-python-headless and then install opencv-python-headless 4.1.2.30. And you can use the following command for that. pip install opencv-python-headless==4.1.2.30
    And your error will be solved.

Solution 1 : Install opencv-python-headless 4.1.2.30

First of all, you have to just uninstall opencv-python-headless by using the below command:

pip uninstall opencv-python-headless

and then install opencv-python-headless 4.1.2.30. And you can use the following command for that.

pip install opencv-python-headless==4.1.2.30

And your error will be solved

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment