Skip to content
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

crashes on start via RDP [solution!] #3736

Closed
swharden opened this issue Nov 24, 2016 · 6 comments
Closed

crashes on start via RDP [solution!] #3736

swharden opened this issue Nov 24, 2016 · 6 comments

Comments

@swharden
Copy link

swharden commented Nov 24, 2016

Description of your problem

What steps will reproduce the problem?

  1. install plain python 3.5.2
  2. pip install pyqt5 spyder
  • spyder launches fine locally
  • spyder will not launch over remote desktop

What is the expected output? What do you see instead?

  • Over remote desktop, spyder crashes with the error at the bottom of the page.

Versions and main components

  • Spyder Version: 3.0.2
  • Python Version: 3.5.2
  • Operating system: Windows 10

image

@swharden
Copy link
Author

swharden commented Nov 24, 2016

Looks like this is similar to #3332

@swharden swharden reopened this Nov 24, 2016
@swharden swharden changed the title crashes on start via RDP (solution noted) crashes on start via RDP Nov 24, 2016
@swharden swharden reopened this Nov 24, 2016
@swharden
Copy link
Author

swharden commented Nov 24, 2016

THIS FIXES THE PROBLEM:

  1. download opengl32sw.dll from the QT downloads page
  2. place it in C:\Program Files\Python35\Lib\site-packages\PyQt5\Qt\bin

I can now load spyder in windows 10 through remote desktop using a generic python installation after pip installing pyqt5 and spyder.

@swharden swharden changed the title crashes on start via RDP crashes on start via RDP [resolved!] Nov 24, 2016
@swharden swharden changed the title crashes on start via RDP [resolved!] crashes on start via RDP [solution!] Nov 24, 2016
@swharden
Copy link
Author

I guess it's still not "resolved" until the developers allow this to happen automatically upon install...

@swharden swharden reopened this Nov 24, 2016
@ccordoba12
Copy link
Member

This is a problem with the PyQt5 wheels, not our problem because we really can't do anything about it.

As you said, you have to install opengl32sw.dll in C:\Program Files\Python35\Lib\site-packages\PyQt5\Qt\bin, and that's a directory owned by PyQt5, not Spyder.

@djconly85
Copy link

djconly85 commented Mar 26, 2020

UPDATE - SOLVED
The issue was resolved by doing the following:

  1. Run a file called "gpedit.msc", which will open up a window for Local Group Policy Editor.
  2. In the tree menu on the left, navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment, and open the Remote Session Environment folder (not the subfolder within it)
  3. Make sure the following are set to "Enabled":
    "Use hardware graphics adapters for all Remote Desktop Services"
    "Prioritize H.265/AVC444 graphics mode for Remote Desktop Connections"
    "Configure H.264/AVC hardware encoding for Remote Desktop Connections"

Then restart the computer.

Original comment:

Not sure if this should be opened as a separate issue, but when I remote log-in and try to launch Spyder, I get the message "LoadLibrary failed with error 126: The module could not be found”.

I tried @swharden's steps of downloading opengl32sw.dll and placing it in ~\Lib\site-packages\PyQt5\Qt\bin, but in my PyQt5 folder I do not see the "Qt" subfolder.

I tried placing the DLL directly in the PyQt5 folder, but that did not fix the issue.

FYI, I'm using Spyder 4.1.1 and I do not experience this error when I launch Spyder locally (i.e., not through a remote connection).

A link to my issue on StackOverflow has more information.

@SilentProwler
Copy link

Since I was unable to get pass LoadLibrary 126 error using the solutions provided online and on here, I stepped back and realized the obvious workaround. The errors occurs when you open the program while you're using a remote session, right? The obvious solution is to launch the program while a remote session is not in progress. To do this while you're remoting, you should create a batch script to launch the program but make sure to include a time delay before that (I used 'timeout 10 /nobreak' to do so). Run the batch script and, before your program launchs, disconnect from RDP. After enough time passes for the program to launch, you can reconnect to RDP and your program will be up and ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants