Skip to content

Could not load the Qt platform plugin #427

@sadams207

Description

@sadams207

Expected behaviour

Application with matplotlib should be able to show a plot window.

Actual behaviour

Segmentation fault during the plotting process.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/sadams/projects/meccanoFork/venv/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Steps to reproduce

  • example code
    `import cv2
    import matplotlib.pyplot as plt
    import matplotlib
    import numpy as np

print(f'Build information: {cv2.getBuildInformation()}')
print(f'CV2 Version: {cv2.version}')
print(f'Matplotlib Version: {matplotlib.version}')
x = np.linspace(0,1,10)
plt.figure()
plt.plot(x)
plt.show()
`

See attached for build information.
Version control: 4.4.0-dirty
qt_debug.txt

Issue submission checklist
  • [ X] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • [ X] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • [ IDK] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • [ X] I'm using the latest version of opencv-python

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