Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "LoadLibrary failed with error 126: The module could not be found" when launching Spyder IDE through VPN

Here's what happens:

  1. Using a Macbook Pro, I use the Microsoft Remote Desktop Connection application to connect to my work computer, which is a Windows 10 machine
  2. If I try to launch Spyder on my work computer, I get this error: Load Library Error

However:

  • If I am at my work computer (i.e. physically at work instead of logging in remotely), I can launch Spyder successfully
  • If I leave Spyder open on my work computer, then go home and do a remote log-in to my work computer, I can use Spyder without issue. The problem/error described above arises only if I try to open Spyder through the remote connection.
  • This error only seems to affect Spyder and I can use all other programs without issue through a remote connection. As a workaround I've been using other IDEs and successfully running scripts, but I strongly prefer Spyder.

What I have tried so far (without success):

  • The 4 troubleshooting steps posted by Fazil M. to this Microsoft thread
  • Uninstalling/reinstalling Spyder using Conda
  • Restarting my work computer

System Information:

  • Work Computer OS: Windows 10, 64-bit
  • OS of computer through which I'm logging in to work computer: Mac OS X El Capitan 10.11.6
  • Spyder version: 4.1.1

Any thoughts as to what could be going on?

Update--More information and trials:

  • I checked out Issue #3736 on Spyder's GitHub. It says to download and add a file called opengl32sw.dll to the folder ~\Lib\site-packages\PyQt5\Qt\bin. But when I go to the PyQt5 folder, I do not see a subfolder for Qt. I tried placing it into the PyQt5 main folder, but that did not fix the problem.
  • I've heard this can be a graphics card issue too. On my machine I have two graphics cards: AMD RadeonT R5 430 and Intel(R) HD Graphics 630.
like image 604
Darren C. Avatar asked Mar 26 '20 00:03

Darren C.


2 Answers

Darren's answer did not work for me. What did work was to:

First option: go into the device manager and disable the Intel HD Graphics card under "display adapters."

Second option:

  1. run "Gpedit.msc"
  2. navigate to Computer Configuration->Administrative Templates->Windows Components->Remote Desktop Services->Remote Desktop Session Host->Remote Session Environment
  3. Disable "use WDDM graphics display driver for remote desktop connections"
  4. Restart the computer

See https://answers.microsoft.com/en-us/windows/forum/all/windows-10-1903-may-update-black-screen-with/23c8a740-0c79-4042-851e-9d98d0efb539

like image 67
Noe Avatar answered Nov 15 '22 10:11

Noe


It took help from my organization's IT contractor, but I fixed the issue 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.

like image 28
Darren C. Avatar answered Nov 15 '22 09:11

Darren C.