I am running 4.1.0 with python 3.7.3. I installed opencv using conda:
conda install -c conda-forge opencv
I don't have any experience using Qt. I am simply trying to show an image or a video using the OpenCV imshow
method:
cv.imshow('Result (Press any key to exit)', img)
cv.waitKey(0)
cv.destroyAllWindows()
But when I run the program, I get this error:
xkbcommon: ERROR: failed to add default include path
Qt: Failed to create XKB context!
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
The program continues to run just fine. However cv.waitKey(0) is not working. I read up about setting the environment variable, but I plan to bundle this program using pyinstaller, so I can't rely on this fix forever.
Is there a permanent fix?