spyder: Spyder v3.0.0b3 gives QOpenGLShader errors during startup
First of all, thanks a lot for the fast fixes regarding the (Py)Qt5 problems. I really appreciate it.
What steps will reproduce the problem?
- Initiate spyder from the terminal
- Splashscreen counts the tasks and disappear
- A proper titlebar and a window is setup however inside is completely empty (black)
What is the expected output? What do you see instead? Instead of the window panes nothing appears and the terminal repeats the following
""
QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
Versions and main components
- Spyder Version: 3.0.0b3
- Python Version: 3.5.1
- Operating system: Linux Mint 17
- PyQt5 : 5.6 (via PyQt5.QtCore.PYQT_VERSION_STR)
- QT5 : 5.5.1 (via PyQt5.QtCore.QT_VERSION_STR)
I also have Python 3.4 installed and I’m not sure which one is picked up by Spyder but python3 maps to 3.4.
Dependencies
N/A
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 40 (3 by maintainers)
Commits related to this issue
- Add OpenGL import for NVIDIA drivers on Ubuntu. — committed to airalcorn2/strike-with-a-pose by airalcorn2 8 years ago
I have same issue. Fedora 24, x86_64, Nvidia GTX 550 Ti with driver NVIDIA 367.44
Instructions by @ilayn doesn’t work for me. But I found another solution.
Adding
into site-packages/spyder/app/start.py solves problem. Now Spyder starts fine. But it creates +1 dependency - pyopengl.
just installing PyOpenGL worked for me
conda install pyopengl
I did @ilayn’s suggestion (selecting the mesa driver) but it didn’t quite work. Related to that: the same file can be edited manually, see https://github.com/Ultimaker/Cura/pull/131#issuecomment-176088664 - found it thanks to @ilayn’s launchpad link:
(due to @ilayn’s suggestion, the i386-linux-gnu_GL.conf contained a reference to the mesa driver which I overwrote)
This worked! (and I don’t need to put the
from OpenGL import GLin spyder’s start.py anymore)Kernel: 4.13.0-38-generic OS: Ubuntu 17.10 64bit
For me adding: from OpenGL import GL in site-packages/spyder/app/start.py resulted in missing python module OpenGL.
Installed missing package: conda install PyOpenGL And spyder runs like a charm.
However, all worked before I installed QtCreator and for OpenGL libraries for OpenGL vidget. Basically spyder stopped working after:
apt-get install libgl1-mesa-dev libglu1-mesa-dev
Like above,
conda install pyopenglworked for me on Ubuntu 16.04 from a clean conda py3.6 environment, no file editing necessaryI’m not sure I fully understand the issue, but couldn’t the correct library be loaded by using
ctypesrather than relying onPyOpenGL(which usesctypesunder the hood too)?Would something like this work maybe?
or maybe:
could someone who’s affected by this bug try to remove the
from OpenGL import GLworkaround and test this instead?While the above mentioned version fixes sound better, someone without the immediate ability to upgrade/reinstall may be interested in the workaround I found at https://stackoverflow.com/questions/42291236/python-spyder-could-not-initialize-glx/64848919#64848919 :
With Spyder 4.2.1 (Qt 5.12.10) on Debian and accessing from Windows with PuTTY and Xming 6.9.0.31 for X11-forwarding, launching Spyder initially failed with the printouts
X server does not support XInput 2andCould not initialize GLX.Setting the environment variable
export QT_XCB_GL_INTEGRATION=nonemade spyder work (within the same console session).@olusis thank you so much! conda install PyOpenGL #fixed similar issue
I also encounter this problem after using
conda update --allI have triedconda install pyopenglnone of them work for me.
Ubuntu 17.10 64, kernel 4.13, Anaconda 4.5.1, python 3.6, spyder 3.2.8, qt 5.9.5, nvidia 390.48, 1080ti
works for me as well.
@ccordoba12 @randyzwitch Ubuntu 16.04 from a clean conda py3.6 environment:
conda install pyopenglno file editing necessary Thank you randyzwitch! (and above someone)In my case the lines
in the start.py file can be removed with no effect.
Awesome, thanks for testing! Someone at https://github.com/qutebrowser/qutebrowser/issues/2821#issuecomment-315817856 confirmed the same too. Looks like we have a simpe pure-Python workaround then 😉
As Peter Wurtz mentioned in the linked LaunchPad page, it is sad to see that this is still not fixed.
I have no idea why this is happening but I’ll write down what I did whether it is relevant or not (because I don’t know what has changed). First I basically added the Ubuntu graphics ppa
Then I installed the newest NVIDIA driver (367.27 at the time of writing) via Driver Manager. Then I have unlinked the symbolic link in the following directory. You can first check the result of
to see whether it is indeed still linked to mesa drivers. Hence, I used the following
After this I’ve used the solution given in AskUbuntu.SE
and then using
first selected Nvidia-367-prime in the list and then one more time selecting the mesa drivers. Now all works properly.
Obviously I don’t know which step (probably the very last one) made it working but for the more knowledgeable people this might give a clue.