Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1547

OpenGL not installed on Ubuntu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.0.3
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None
    • Environment:
      Ubuntu 20.04
    • Platform/s:
      Linux/X11

      Description

      I've found PySide v5 really useful for a couple of projects, and I was looking forward to v6. I tried using pip install and then running the [quickstart code|https://doc.qt.io/qtforpython/quickstart.html.] It worked fine on Windows, but on Ubuntu 20.04, I got the error: ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

      Here's a complete reproduction on a clean VirtualBox install with the latest OS patches:

      don@don-VirtualBox:~$ python3 -V
      Python 3.8.5
      don@don-VirtualBox:~$ python3 -mvenv venv
      don@don-VirtualBox:~$ . venv/bin/activate
      (venv) don@don-VirtualBox:~$ pip install pyside6
      Collecting pyside6
      {{ Downloading PySide6-6.0.3-6.0.3-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (185.3 MB)}}
      {{ |████████████████████████████████| 185.3 MB 22 kB/s }}
      Collecting shiboken6==6.0.3
      {{ Downloading shiboken6-6.0.3-6.0.3-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (983 kB)}}
      {{ |████████████████████████████████| 983 kB 4.3 kB/s }}
      Installing collected packages: shiboken6, pyside6
      Successfully installed pyside6-6.0.3 shiboken6-6.0.3
      (venv) don@don-VirtualBox:~$ python -c "from PySide6 import QtWidgets"
      Traceback (most recent call last):
      {{ File "<string>", line 1, in <module>}}
      ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory
      (venv) don@don-VirtualBox:~$

      If I install OpenGL with GLUT, then the import error stops, and the quickstart code works.

      sudo apt-get install freeglut3 freeglut3-dev

      I thought that using pip install pyside6 was supposed to be all the installation your app needs, as it is in Windows. Can a future release include OpenGL, please?

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              donkirkby Don Kirkby
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes