Import Error: Dll Load Failed in Jupyter Notebook But Working in .Py File

Import error: DLL load failed in Jupyter notebook but working in .py file

I encountered the same problem running Jupyter Notebook from PowerShell. Even though the question was asked a year back, I am answering it here to help those who encounter the same error recently. In my case, first, I activated the root environment activate base then I ran jupyter notebook and it worked just fine. Once you activate the base, you will notice that the prompt will change like this: (base) X:\Users\xxxxx\current-directory-name>.

  • Note that the command activate base will not work on Powershell. You have to switch to command prompt running cmd or you
    may try the whole thing on the command prompt instead of PowerShell.

  • If the required paths

    (path:\to\Anaconda3\;path:\to\Anaconda3\Scripts;path:\to\Anaconda3\Library\mingw-w64\bin;path:\to\Anaconda3\Library\usr\bin;path:\to\Anaconda3\Library\bin)
    are available to your PowerShell environment, then you don't need to
    activate the "base" environment.

Jupyter notebook does not launch (ImportError: DLL load failed while importing)

I found what I did wrong (silly me). Microsoft visual C++ 2015-2019 was somehow removed when I tried to install openCV manually. Didn't think that such an install would make such big impact, have to keep that in mind now but installing the latest solved all the problems.

P.S.: This solution might not work for someone else with similar problem. But its worth taking a note.

ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

Unofficial Windows Binaries for Python Extension Packages

You can find any Python libraries from here.



Related Topics



Leave a reply



Submit