Loading...
Loading...
ModuleNotFoundError: No module named 'cv2'This error occurs when the OpenCV (Open Computer Vision) library is not installed in your current Python environment. While the library is imported as 'cv2', the package name used for installation is 'opencv-python'.
Run the correct installation command in your terminal. Use 'opencv-python' for the main library.
pip install opencv-pythonIf you need extra algorithms (like SIFT/SURF), install the contrib version.
pip install opencv-contrib-pythonIf you use Conda, use the following command instead of pip.
conda install -c conda-forge opencv