Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Error: ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory
Forum Update on Monday, May 27th 2025

Error: ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

Scheduled Pinned Locked Moved Solved Qt for Python
3 Posts 2 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eric Song
    wrote on 13 Nov 2021, 05:21 last edited by Eric Song
    #1

    Hi guys,
    I am learning Qt6-python following create-a-simple-application.
    But I meet an error as below,

    Traceback (most recent call last):
    File "***/hello_world.py", line 3, in <module>
    from PySide6 import QtCore, QtWidgets, QtGui
    ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

    So, how can I solve it?

    Any answer or guide will be appreciated!

    J 1 Reply Last reply 13 Nov 2021, 06:52
    0
    • E Eric Song
      13 Nov 2021, 05:21

      Hi guys,
      I am learning Qt6-python following create-a-simple-application.
      But I meet an error as below,

      Traceback (most recent call last):
      File "***/hello_world.py", line 3, in <module>
      from PySide6 import QtCore, QtWidgets, QtGui
      ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

      So, how can I solve it?

      Any answer or guide will be appreciated!

      J Offline
      J Offline
      JonB
      wrote on 13 Nov 2021, 06:52 last edited by JonB
      #2

      @Eric-Song
      Hello and welcome.

      That library is used to support OpenGL. Not my area, but I would not have thought your app should be using that....

      ...Ah ha, indeed! Apparently a PySide6 bug to require it. See https://bugreports.qt.io/browse/PYSIDE-1461 for bug report and https://stackoverflow.com/questions/65751536/importerror-libopengl-so-0-cannot-open-shared-object-file-no-such-file-or-dir for solution.

      1 Reply Last reply
      2
      • E Offline
        E Offline
        Eric Song
        wrote on 23 Nov 2021, 06:27 last edited by
        #3

        Yes, sudo apt install libopengl0 -y works for me.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved