Usually the red report after import is because there is no module, use pip install cv2 to download the module, it will appear:
Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2
You are using pip version 18.1, however version 19.0.2 is available.
You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.
At this point you need to type python -m pip install –upgrade pip
When the installation is complete, run this line “pip install opencv-python”, this line is to install the cv2 module, wait until the download is complete
To install the numpy module, you only need to pip install numpy
The summary is as follows:
python -m pip install --upgrade pip
pip install opencv-python
pip install numpy
Read More:
- Import * has a red wavy line, but the operation does not report an error
- Raspberry pie import opencv error: ImportError: numpy.core.multiarray failed to import
- [Solved] OpenCV Import Error: ImportError: numpy.core.multiarray failed to import
- How to Solve M1 chip import numpy Error
- [Mac Pro M1] Python3.9 import cv2 Error: Reason: image not found
- Python ImportError: numpy.core.multiarray failed to import
- [Solved] import pyzed No Error, but import pyzed.sl report an Error (zed-pythonAPI Installing)
- [Solved] cv2.xfeatures2d.SIFT_create() Error: module ‘cv2.cv2’ has no attribute ‘xfeatures2d’
- [Solved] mnn Import Error: initMNN: init numpy failed
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- VScode import numpy Error: DLL load failed [How to Solve]
- [Solved] cv2.error: (-215:Assertion failed) encoder->isFormatSupported(CV_8U) in function ‘imwrite_‘
- For the problem of rejecting old usage errors after numpy is updated, modified in numpy 1.20; for more details and guidance
- [Solved] Pytorch Tensor to numpy error: RuntimeError: Can‘t call numpy() on Tensor that requires grad.报错
- Keras import package error: importerror: cannot import name ‘get_ config‘
- [Solved] module ‘numpy.random‘ has no attribute ‘default_rng‘ gensim.model
- [Solved] From pip._internal import cmdoptions ImportError: cannot import name SourceDistribution
- [Solved] Ubuntu using blender script error: Numpy cannot be found
- Python Import Error: SystemError: Parent module ‘‘ not loaded, cannot perform relative import
- Python error collection: NameError: name ‘numpy’ is not defined