导入错误:Jupyter笔记本中的DLL加载失败,但在.py文件中工作

第n次尝试:

在Anaconda环境中安装了BreakoutDetection模块。当我尝试import breakout_detection在jupyter Notebook中使用导入模块时,出现以下错误

---------------------------------------------------------------------------
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.

我可以在python shell中导入相同的模块

print sys.path在python shell和jupyter笔记本中都查看了系统路径()。他们都是一样的。print sys.executable两者的可执行路径()也相同。

有人可以帮我解决该问题的步骤吗?谢谢!

picklu:

我从PowerShell运行Jupyter Notebook时遇到了相同的问题。即使一年后才问这个问题,我还是在这里回答这个问题,以帮助那些最近遇到相同错误的人。就我而言,首先,我激活了根环境,activate base然后运行了jupyter notebook,它运行得很好。激活基座后,您会注意到提示将如下更改:(base) X:\Users\xxxxx\current-directory-name>

  • 请注意,该命令activate base在Powershell上不起作用。您必须切换到正在运行的命令提示符,cmd或者可以在命令提示符处而不是PowerShell上尝试整个操作。

  • 如果所需的路径
    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)可用于您的PowerShell环境,则无需激活“基本”环境。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

jupyter笔记本中的内存错误

导入错误:无法从 jupyter 笔记本中的“app”(app.ipynb)导入名称“app”

Conda / Python:导入错误-仅在jupyter笔记本中找不到图像

Python 中的缩进错误(在 Jupyter 笔记本中)

导入tensorflow在终端中工作,但不在jupyter笔记本中

在jupyter实验室中找不到“模块”,但在“ jupyter笔记本”中可以正常工作

如何将jupyter笔记本目录中的模块导入较低目录中的笔记本?

Python Tkinter无法在.py文件中工作

jupyter笔记本中的VS代码?

jupyter笔记本中的内存限制

在jupyter笔记本python中密谋

Jupyter笔记本中的Imagegrid

不同笔记本中的 Jupyter 类?

jupyter笔记本中的打字稿

无法在Jupyter笔记本中绘图

在Firefox中冻结的jupyter笔记本

导入csv返回Jupyter笔记本中初始位置Julia中的编码标识符

在Jupyter笔记本中重新加载Python模块(不自动重新加载)

在jupyter笔记本中打开.csv文件时出现dtype错误

如何在VS Code中调试导入的Jupyter笔记本?

在jupyter笔记本中创建原始python文件

文件名作为 Jupyter 笔记本中的变量

在Docker Jupyter笔记本的GUI中显示卷文件

如何显示Jupyter笔记本的版本并在Jupyter笔记本中运行单元格?我收到一个错误:翻译错误

我如何让我的 .env 文件在我的 .py 文件中工作?

无法从Jupyter-lab笔记本和pathlib.Path导入父文件夹中的模块

导入flask_wtf与jupyter笔记本一起正常工作,但命令提示符出现错误

VS Code中的“运行单元需要安装Jupyter笔记本”错误

错误“无法打开Jupyter笔记本:端口8888已在使用中”