Skip to content

Qt Error on cv2.imshow - Specific to version 4.2.0.32 #290

Closed
@NeilGraham

Description

@NeilGraham

Issue

Calling cv2.imshow with opencv-python 4.2.0.32 results in the following error:

qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Solution

I am able to fix the issue by:

  • uninstalling the current version: 4.2.0.32
  • reinstalling the previous version: 4.1.2.30
pip uninstall opencv-python
pip install opencv-python==4.1.2.30

Repoduce

import cv2 
img = cv2.imread('./path/to/picture.png', cv2.IMREAD_GRAYSCALE)
cv2.imshow('image', img)
  • macOS 10.15.2 x86
  • Python 3.8.1
  • opencv-python 4.2.0.32

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