2

I'am currently trying to get some images outputted after running this code:

import cv2 as cv
import matplotlib.pyplot as plt

img = cv.imread('Photos/cat.jpg')
cv.imshow('cat', img)

plt.imshow(img)
plt.show()

But instead, I'm receiving the following error message in Pycharm:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/Joel/PycharmProjects/opencv_project/venv/lib/python3.9/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.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

I wanted to install 'xcb', but there is no such package in arch repos (there is 'libxcb' though, so I installed that and still get this error).

Coelll
  • 31
  • 4

0 Answers0