# Installing PyQt5 in a Docker Container

**URL:** <https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328>\
**Category:** Jetson AGX Orin\
**Tags:** docker, containers\
**Created:** [December 16, 2022, 10:05pm UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328 "2022-12-16T22:05:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsorbello](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rsorbello](https://forums.developer.nvidia.com/u/rsorbello)\
**Post date:** [December 16, 2022, 10:05pm UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/1 "2022-12-16T22:05:49Z")

</div>

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](https://global.discourse-cdn.com/nvidia/original/3X/b/3/b3e613dd2d9c80f898b05ccd5be8cbbb49e3772e.png)

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.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [December 19, 2022, 2:37am UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/3 "2022-12-19T02:37:49Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![rsorbello](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rsorbello](https://forums.developer.nvidia.com/u/rsorbello)\
**Post date:** [December 19, 2022, 3:07am UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/4 "2022-12-19T03:07:34Z")

</div>

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?

 ![Screenshot from 2022-12-18 22-13-36](https://global.discourse-cdn.com/nvidia/original/3X/3/7/37b1c0a42b7f20dc187cad366856531b68bdd9f6.png)

---

<div class="post-metadata">

**Author:** ![rsorbello](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rsorbello](https://forums.developer.nvidia.com/u/rsorbello)\
**Post date:** [December 19, 2022, 3:10am UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/5 "2022-12-19T03:10:55Z")

</div>

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

 ![Screenshot from 2022-12-18 22-00-00](https://global.discourse-cdn.com/nvidia/original/3X/5/d/5da62b6dc36dd0ac8fabedcc747affe48bb4a730.png)

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [December 20, 2022, 2:37am UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/6 "2022-12-20T02:37:14Z")

</div>

Hi,

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

> **[NVIDIA L4T PyTorch | NVIDIA NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch)**
>
> PyTorch is a GPU accelerated tensor computational framework with a Python front end. This container contains PyTorch and torchvision pre-installed in a Python 3 environment to get up & running quickly with PyTorch on Jetson.

Thanks.

---

<div class="post-metadata">

**Author:** ![user3116](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@user3116](https://forums.developer.nvidia.com/u/user3116)\
**Post date:** [January 9, 2023, 4:40pm UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/8 "2023-01-09T16:40:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [January 23, 2023, 4:41pm UTC](https://forums.developer.nvidia.com/t/installing-pyqt5-in-a-docker-container/237328/9 "2023-01-23T16:41:02Z")

</div>

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