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

Darren C. picture Darren C. · Mar 26, 2020 · Viewed 10.8k times · Source

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.

Answer

Noe picture Noe · Jun 1, 2020

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