[PyQt] Ubuntu, PyQt/Qt 5.9, QOpenGLShaderProgram "is not linked"

David Cortesi davecortesi at gmail.com
Tue Jul 18 19:38:16 BST 2017

OK I tested with the simple fix,

    if sys.platform.startswith('linux') : from OpenGL import GL

and it worked. Also as Florian suggested, using --exclude-module=OpenGL
when building with PyInstaller for other platforms takes care of that issue.

I poked around inside Ubuntu 16.04 (64-bit) looking for libGL.so and there
is just a mess of them.

   /usr/lib/x86_64-linux-gnu/libGL.so -> mesa/libGL.so
  /usr/lib/x86_64-linux-gnu/mesa/libGL.so -> libGL.so.1.2.0
  /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 ->

Since the original Ubuntu bug report (linked earlier) said the problem was
using the "mesa" libs, and since I don't see anything nvidia-related dlls
-- and since the import work-around fixed it -- I didn't want to mess with
that. Perhaps ctypes.cdll.LoadLibrary("libGL.so.1") would pick up the last
one, libGL.so., but I don't know.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170718/5b08cf3c/attachment.html>

More information about the PyQt mailing list