Skip to content

No modules named 'cv2' for imutils #271

Open

Description

@ss8319

I am getting the following error.
I have installed imutils using pip install opencv-contrib-python as recommended by PyImageSearch

"C:\Users\USER\Desktop\Year 3\ObjectTracker\venv\Scripts\python.exe" "C:/Users/USER/Desktop/Year 3/ObjectTracker/objecttracker.py"
Traceback (most recent call last):
  File "C:\Users\USER\Desktop\Year 3\ObjectTracker\objecttracker.py", line 2, in <module>
    from imutils.video import VideoStream
  File "C:\Users\USER\Desktop\Year 3\ObjectTracker\venv\lib\site-packages\imutils\__init__.py", line 8, in <module>
    from .convenience import translate
  File "C:\Users\USER\Desktop\Year 3\ObjectTracker\venv\lib\site-packages\imutils\convenience.py", line 6, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

Activity

  1. TuanBC commented on May 29, 2022

    @TuanBC

    I think you can try installing opencv-python too.

    opencv-contrib-python is an extra package for extra features from opencv ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions