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

nth-attempt :

I installed BreakoutDetection the module in Anaconda environment. When I tried to import the module using import breakout_detection in jupyter notebook, I get the below error

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-18-96c0fdb15b96> in <module>()
----> 1 import breakout_detection

C:\Users\sgadiyar\AppData\Local\Continuum\Anaconda2\lib\site-packages\breakout_detection.py in <module>()
     15         except ImportError:
     16             return importlib.import_module('_breakout_detection')
---> 17     _breakout_detection = swig_import_helper()
     18     del swig_import_helper
     19 elif _swig_python_version_info >= (2, 6, 0):

C:\Users\sgadiyar\AppData\Local\Continuum\Anaconda2\lib\site-packages\breakout_detection.py in swig_import_helper()
     14             return importlib.import_module(mname)
     15         except ImportError:
---> 16             return importlib.import_module('_breakout_detection')
     17     _breakout_detection = swig_import_helper()
     18     del swig_import_helper

C:\Users\sgadiyar\AppData\Local\Continuum\Anaconda2\lib\importlib\__init__.pyc in import_module(name, package)
     35             level += 1
     36         name = _resolve_name(name[level:], package, level)
---> 37     __import__(name)
     38     return sys.modules[name]

ImportError: DLL load failed: The specified procedure could not be found.

I could import the same module in python shell

I looked at the system paths (print sys.path) and in both python shell and jupyter notebook. They both are the same. Executable path (print sys.executable) is also the same for the both.

Can someone help me out on the steps I should take to resolve this issue? Thanks!

picklu :

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From

Import py file in another directory in Jupyter notebook

From Dev

How to import a python .py file in Jupyter Notebook

From Dev

"DLL load failed: The specified module could not be found" error on using wordcloud in Jupyter notebook

From Dev

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

From Dev

How to import jupyter notebook file in my flask app.py?

From Dev

importError: DLL load failed(import h5py)

From Dev

failed: Network error while downloading Excel file generated by jupyter notebook

From Dev

Import python file to Jupyter Notebook

From Dev

PyQt5 pyuic Import error: DLL load failed

From Dev

Pyinstaller: Import Error: DLL load failed: The specified module could not be found

From Dev

failed to import module in another jupyter notebook

From Dev

Code not working in Jupyter Notebook, csv file, name error

From Dev

ImportError: DLL load failed, while file is in working directory

From Dev

import tensorflow working in terminal but not in jupyter notebook

From Dev

windows vim ":py import socket" returns "load dll failed: method not found"

From Dev

Import subfolder file from Jupyter Notebook

From Dev

jupyter notebook import error: no module named 'matplotlib'

From Java

"import torch" giving error "from torch._C import *, DLL load failed: The specified module could not be found"

From Dev

import matplotlib._png as _png Import: Error: DLL load failed: The specified module could not be found

From Python

Load markdown file on a jupyter notebook cell

From Dev

Jupyter Notebook: Import .ipynb file and access it's method in other .ipynb file giving error

From Dev

Can't import Orekit - 'DLL load failed'

From Dev

python tensorflow import dll load failed

From Dev

VTK import throws an error of DLL load error in vtkCommonKit.py line 5

From Dev

Python: Running function with argument from .py file fails with error. Same works in Jupyter Notebook

From Dev

Failed to write .bat file for launching jupyter lab (jupyter notebook)

From Dev

Pyspark import .py file not working

From Dev

import _ssl error,DLL load failed ,Python 37 Anaconda Windows 10

From Dev

ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

Related Related

  1. 1

    Import py file in another directory in Jupyter notebook

  2. 2

    How to import a python .py file in Jupyter Notebook

  3. 3

    "DLL load failed: The specified module could not be found" error on using wordcloud in Jupyter notebook

  4. 4

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

  5. 5

    How to import jupyter notebook file in my flask app.py?

  6. 6

    importError: DLL load failed(import h5py)

  7. 7

    failed: Network error while downloading Excel file generated by jupyter notebook

  8. 8

    Import python file to Jupyter Notebook

  9. 9

    PyQt5 pyuic Import error: DLL load failed

  10. 10

    Pyinstaller: Import Error: DLL load failed: The specified module could not be found

  11. 11

    failed to import module in another jupyter notebook

  12. 12

    Code not working in Jupyter Notebook, csv file, name error

  13. 13

    ImportError: DLL load failed, while file is in working directory

  14. 14

    import tensorflow working in terminal but not in jupyter notebook

  15. 15

    windows vim ":py import socket" returns "load dll failed: method not found"

  16. 16

    Import subfolder file from Jupyter Notebook

  17. 17

    jupyter notebook import error: no module named 'matplotlib'

  18. 18

    "import torch" giving error "from torch._C import *, DLL load failed: The specified module could not be found"

  19. 19

    import matplotlib._png as _png Import: Error: DLL load failed: The specified module could not be found

  20. 20

    Load markdown file on a jupyter notebook cell

  21. 21

    Jupyter Notebook: Import .ipynb file and access it's method in other .ipynb file giving error

  22. 22

    Can't import Orekit - 'DLL load failed'

  23. 23

    python tensorflow import dll load failed

  24. 24

    VTK import throws an error of DLL load error in vtkCommonKit.py line 5

  25. 25

    Python: Running function with argument from .py file fails with error. Same works in Jupyter Notebook

  26. 26

    Failed to write .bat file for launching jupyter lab (jupyter notebook)

  27. 27

    Pyspark import .py file not working

  28. 28

    import _ssl error,DLL load failed ,Python 37 Anaconda Windows 10

  29. 29

    ver.2 PyGreSQL ERROR: from _pg import * ImportError: DLL load failed: The specified module could not be found

HotTag

Archive