-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spyder v3.0.0b3 gives QOpenGLShader errors during startup #3226
Comments
Right click shows all the relevant menu options and I can visualize the layout based on the menu choices. Hence this looks like a rendering problem. I have updated my Qt to version 5.6 and it is still the same. |
I don't know where this problem could be coming from, sorry. |
This turns out to be a NVIDIA driver issue. I have found other instances across different projects suffering from the same wrong selection of The graphics card I have is GeForce GT 550M (optimus-based) and if I switch to the onboard Intel graphics card or switch to There is no current solution unfortunately for this. |
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. |
@ilayn, thanks for letting us know about it :-) |
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 from OpenGL import GL into site-packages/spyder/app/start.py solves problem. Now Spyder starts fine. But it creates +1 dependency - 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 Ultimaker/Cura#131 (comment) - 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 |
As Peter Wurtz mentioned in the linked LaunchPad page, it is sad to see that this is still not fixed. |
I just hit this bug too when trying to switch to running Spyder with qt5/py3 instead of qt4/py2. I realize this problem is not the fault of spyder devs... the discussion on launchpad makes it clear that the problem is that PyQt opens I acknowledge that this is a workaround, but what exactly is the problem with adding |
Certainly none, we were unsure that this was the right fix. @drammock, would you mind to create a PR with this fix? Please do it against the |
@ccordoba12 I'll try to get to this today or tomorrow. |
We have to be careful though not all systems are affected by this and a workaround can break existing functional systems. I would really recommend having opinions of other users with different setups. |
bumped into the same bug today, |
I'm not sure I fully understand the issue, but couldn't the correct library be loaded by using Would something like this work maybe? import ctypes
ctypes.cdll.LoadLibrary("libGL.so.1") or maybe: ctypes.CDLL("libGL.so.1", mode=ctypes.RTLD_GLOBAL) could someone who's affected by this bug try to remove the |
starts fine Fedora 26, Spyder 3.1.4, Dell XPS 13 (only intel video) |
Awesome, thanks for testing! Someone at qutebrowser/qutebrowser#2821 (comment) confirmed the same too. Looks like we have a simpe pure-Python workaround then 😉 |
@The-Compiler This is also mentioned in the launchpad link mentioned above but I don't think this is generic enough for some. There was another forum page back then which I can't find now that mentioned that this wasn't working for them. I think the best course of action is to press on the fix on the nvidia/pyqt dev side. |
Oh, I must've missed that. I've asked some more people to test, and the |
Yes I agree, pyqt people didn't even acknowledged that this is a bug which is strange to say the least. |
Probably because it isn't a PyQt bug 😉 |
Oh yes what I mean is that they could also help to point to this problem but anyways. |
Kernel: 4.13.0-38-generic For me adding: Installed missing package: However, all worked before I installed QtCreator and for OpenGL libraries for OpenGL vidget. apt-get install libgl1-mesa-dev libglu1-mesa-dev |
Anaconda 5.1 with python=2.7, spyder=3.2.8, qt=5.9.5
in Interestingly
but this does not not help as PyOpenGL is not a spyder dependency and is not installed in my Anaconda distribution. Can I safely remove the mesa drivers ( |
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. |
In my case the lines
in the start.py file can be removed with no effect. |
just installing PyOpenGL worked for me conda install pyopengl |
I also encounter this problem after using
none of them work for me. |
I was getting: then doing:
I started getting: This is occurring using MobaXterm 10.5 connecting to Ubuntu 16 and Centos 7 remote hosts. Any suggestions? |
Hi all, Just wanted to add that I experienced this bug on Ubuntu 16.04, but it was solved using @xxblx solution by adding:
to Some things to note: I am running anaconda3 (so Python 3.6), but I replicated this bug inside of a Python 2.7 environment. Interestingly, when I am in my Python 3.6 environment, Spyder works fine, but when I try to launch it inside of my Python 2.7 environment, Spyder throws the bug described in this thread. I am running a Nvidia GTX 1070 (on a laptop) on driver 384.130. In my base (Python 3.6) environment, I am running Spyder 3.2.6 Note that I did need to install OpenGL into my Python 2.7 environment in order for this fix to work (I did not have it installed originally). I did this using:
inside my Python 2.7 environment. Edit: actually, as described by @RinaldoB, the lines:
Are already inside my start.py file. They didn't do anything because OpenGL was not installed on my system (the except condition was thrown). After simply installing OpenGL in the manner I described above, the bug is fixed without the need for adding:
to my In summary, for most people, I believe all you need to do is install OpenGL into the python environment that's demonstrating this bug, and it should fix. |
@brennanyama: Thanks for the informative post. Looks like I'm out of luck for a pre-built version for Power 9 achitecture.
|
@ProgramItUp: If you type Alternatively, if that doesn't work you can try install opengl using
|
Hoping I can take advantage of the knowledge built-up around this issue instead of starting a new one I have the exact problem described by the OP except I'm running on a Windows 7 environment, so the libgl.so fixes do not apply. More details: On Windows 7 Enterprise 64 bit (7601), Intel Graphics 2000 (with latest drivers), DX 11. Problem exactly as described by OP (splashscreen, followed by black window but with appropriate mouse-overs, interactions, etc..). Also same error messages in console. In this case: After researching the issue, I also installed pyopengl (3.1.1a1). The start.py contained the try: from opengl import gl except pass lines already. Just for fun I eliminated the try/except block and no change. My understanding is that this is a Qt issue (that may have popped up around 5.6->5.7?), but I haven't found a windows 7 specific solution. Any suggestions? |
@olusis thank you so much! |
@olusis thanks for your answer, it fixed spyder on the same issue. Kubuntu 16.04, nvidia 860m, Driver Version: 384.130, Spyder 3.2.8 |
Like above, |
Ubuntu 16.04 64, Anaconda 5.2.0, python 3.6, Spyder 3.3.0, Nvidia GeForce GTX 460 Add at the beggining of the file
works for me too. *Note: On a virtual enviroment, the path is |
@ccordoba12 @randyzwitch |
I had this problem, spyder was not starting when using a ssh connection and I had the error : I could not solve it by installing pyopengl, nor any other fixes above. I got it working by reinstalling a full conda environment to make sure I have the matplotlib version that I wanted : 3.1.1 |
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 Setting the environment variable |
Comment #3226 (comment) works perfectly. Thank you @erik-mansson! Seems that it's setting the environment variable is the key. |
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?
What is the expected output? What do you see instead?
Instead of the window panes nothing appears and the terminal repeats the following
Versions and main components
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
The text was updated successfully, but these errors were encountered: