Installing PyQt5 in a Docker Container

Hi I am having a strange issue getting PyQt5 working in a containerized environment on the Jetson Orin.

Outside of the container I am easily able to run “sudo apt install python3-pyqt5” and import the library in python. A simple gui can easily be created.

However inside of the container, if I install PyQt5 (same command), the installation completes, but python does not recognize the library.

Screenshot from 2022-12-16 16-50-02

Another approach I tried was to uninstall pyqt5 by running “apt remove python3-pyqt5” then install using pip (“pip install PyQt5”). Originally, I was getting a wheel error when running this command, but this was solved (I think?) by running “apt install qt5-default”. Now when I run “pip install PyQt5” it continues to get locked up during the “Preparing wheel metadata” portion of installation. I have waited as long as 30 minutes with no progress past this point.

Does anybody know why I am able to use PyQt5 with no issues outside of a container environment, and not inside the container? And possibly some solutions to getting this to work inside the container? Thank you so much in advance.

Hi,

Could you share which container you used with us first?
Thanks.

Thank you for the reply. Please find a screenshots below of the Dockerfile we are using to create the image. Maybe there is something wrong with what we are doing in this file?

Also, just in case it is important, please find the docker compose file we are using to create the container from this image.

Hi,

Could you try an L4T-based container to see if it works?

Thanks.

I tried both L4T PyTorch and L4T ML containers but it no longer work. Did something change recently? I was able to use PyQt5 till last Thursday (1/5).

Here is the error message i’m getting (the ‘/tmp/runtime-root’ error message didn’t cause any issue, it was just the gt.glx error):

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’

qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.

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