After installing opencv with PIP3, an error is reported when importing CV2 through Python 3, as follows:
from .cv2 import *
ImportError: numpy.core.multiarray failed to import
Beacuse the version of NumPy library is too low or too high, which is not suitable for the newly installed opencv version
if we use pip to install the latest version of OpenCV, that is, the installation command:
pip3 install opencv-python
pip3 install opencv_contrib-python
It means that the numpy version is too low, so we should install the latest version:
Command: pip3 install -U numpy
After installation, you can import OpenCV
Read More:
- [Solved] OpenCV Import Error: ImportError: numpy.core.multiarray failed to import
- Python ImportError: numpy.core.multiarray failed to import
- [Solved] Original error was: No module named ‘numpy.core._multiarray_umath‘
- Keras import package error: importerror: cannot import name ‘get_ config‘
- [Solved] From pip._internal import cmdoptions ImportError: cannot import name SourceDistribution
- How to Solve M1 chip import numpy Error
- Import CV2 & Numpy report red Warning and Error [How to Solve]
- Raspberry pie compilation and installation opencv error: fatal error: bootdesc_bgm.i: No such file or directory
- [Solved] Pyinstaller package opencv error: ImportError: OpenCV loader: missing configuration file: [‘config.py’]. Check OpenCV installation.
- [Solved] D2lzh_Pytorch Import error: importerror: DLL load failed while importing
- VScode import numpy Error: DLL load failed [How to Solve]
- [Solved] mnn Import Error: initMNN: init numpy failed
- Import win32API; importerror: DLL load failed: the specified program was not found
- How to Solve Error “ImportError: cannot import name imsave“
- How to Solve Python ImportError: cannot import name UnrewindableBodyError
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- [Solved] Numpy Load Error: DLL load failed while importing _multiarray_umath: Could not be found Module
- import statsmodels.api as sm Error: ImportError: DLL load failed while importing _arpack: The specified program could not be found.
- ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.
- [Solved] Django project locally Open Error: importerror: couldn’t import Django