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

OpenGL not installed on Ubuntu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 6.0.3
    • PySide
    • None
    • Ubuntu 20.04
    • Linux/X11
    • 35deefbc82892b7002913dc527e3403ae00f573c (pyside/pyside-setup/dev) d3b264e14933c4b35a070c76b51adc00426a4bce (pyside/pyside-setup/6.2)

    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

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes