Issues with opencv-python

I'm trying to run a very simple program with opencv-python:

import cv2

img = cv2.imread("blank.jpg")
cv2.imshow("image", img)

Running this with python3 results randomly in either the correct behavior (one window displaying the image) or two different incorrect behaviors (two windows, one with a black bar across the center and one displaying the image OR two windows, both with black bars).

I've tried installing opencv-python both from pip3 and from the AUR, the problem remains the same. I'm fairly confident this is an issue with my Manjaro setup, as my Windows machine runs the same code without problems.

I'm new, so I really don't know what information might be helpful in resolving this. I'm on the stable version of Manjaro KDE.

Thanks for the help.

Probably not a Manjaro related issue or an issue with your setup:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by