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 runningcmd
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
Calculate Angle (Clockwise) Between Two Points
How to Get the Url of the Active Google Chrome Tab in Windows
Algorithm for Distributing a Number Between Certain Number of Chunks
How to Concisely Replace Column Values Given Multiple Conditions
Clearing All Labels from a Tkinter Window
How to Remove Additional Commas in a List in Python
Create a New Dataframe Based on Rows With a Certain Value
Pandas - Replace Outliers With Groupby Mean
Python Key Error=0 - Can't Find Dict Error in Code
Plotting Categorical Data With Pandas and Matplotlib
Access Is Denied When Trying to Pip Install a Package on Windows
How to Print the Even-Indexed and Odd-Indexed Characters of Strings
Drop Non-Numeric Columns from a Pandas Dataframe
Calculate the Lcm of a List of Given Numbers in Python
Pandas Groupby Columns With Nan (Missing) Values
Python Converting MySQL Query Result to Json
Python - Ensuring a Variable Holds a Positive Number
Pip3: Command Not Found But Python3-Pip Is Already Installed