<div dir="ltr">I had a hard time tracking this down and the 'solution' is somewhat hard to find.  I'm sending this to get it out there a bit better and increase the odds of other people finding it.<div><br></div>


<div>In short, the solution is: `pip install PyOpenGL` and then put `from OpenGL import GL` at the top of any files you are having issues with.</div><div><br></div><div>Many thanks to Peter Wuertz for this fix!!  See: these links:</div>


<div><div><a href="http://thread.gmane.org/gmane.linux.ubuntu.bugs.general/3985762/focus=25964" target="_blank">http://thread.gmane.org/gmane.linux.ubuntu.bugs.general/3985762/focus=25964</a></div><div><a href="https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826" target="_blank">https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826</a></div>


</div><div><br></div><div>This is how the problem and solution look on my machine (using <font face="courier new, monospace">pyqt/examples/quick/animation</font> as my example):<br></div><div><div><br></div><div><div><font face="courier new, monospace">$ python animation.py </font></div>


<div><font face="courier new, monospace">QOpenGLShaderProgram: could not create shader program </font></div><div><font face="courier new, monospace">QOpenGLShader: could not create shader </font></div><div><font face="courier new, monospace">Renderer failed shader compilation: </font></div>


<div><font face="courier new, monospace">"" </font></div><div><font face="courier new, monospace">Segmentation fault</font></div><div><font face="courier new, monospace">$ pip install PyOpenGL</font></div><div>

<font face="courier new, monospace">Requirement already satisfied (use --upgrade to upgrade): PyOpenGL in /home/russ/.virtualenvs/edms/lib/python2.7/site-packages</font></div>
<div><font face="courier new, monospace">Cleaning up...</font></div><div><font face="courier new, monospace">$ #add the OpenGL import at the top of the file (demonstration hack!)</font></div><div><font face="courier new, monospace">$ sed -i '1ifrom OpenGL import GL\n' animation.py</font></div>


<div><font face="courier new, monospace">$ python animation.py  #This now works perfectly!  Woohoo!</font></div><div><font face="courier new, monospace">Segmentation fault</font></div><div><br></div><div>The segfault remains when you close the app, but at least QtQuick now works!!  I'm not sure about the segfault yet, but am assuming it's along the lines of this:</div>


<div><a href="http://python-camelot.s3.amazonaws.com/gpl/release/pyqt/doc/advanced/development.html" target="_blank">http://python-camelot.s3.amazonaws.com/gpl/release/pyqt/doc/advanced/development.html</a><br></div><div>

<br></div><div>I saw some references indicating this could be due to old OpenGL drivers.  In my case it is not.  For good measure:</div>
<div><br></div><div>$ glxinfo | grep "OpenGL version"<br></div><div>OpenGL version string: 3.3.0 NVIDIA 304.88</div></div><div><br></div><div>Also worth noting/confirming is that with my setup I had no issues getting QtQuick it working in C++.  Only PyQt5 had problems.<br>


</div><div><br></div><div>Russ</div><div><br></div></div></div>