The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错

The kernel failed to start as a dll could not be loaded: Anaconda环境运行Jupiter Notebook时由于无法启动kernel报错

1. 报错形式:

The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第1张图片
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第2张图片
进入log日志出现以下报错:

根据报错 ‘ImportError: DLL load failed while importing _sqlite3: 找不到指定的模块。\r\n’ 提示应该时缺少了_sqlite3的包

2. 解决方法:

此时去SQLite的官网下载sqlite3的压缩包,并将其解压至anaconda环境的的DLL文件夹下即可

Step1.

进入SQLite官方下载网址 https://www.sqlite.org/download.html
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第3张图片
下滑找到Precompiled Binaries for Windows
下载相应的sqlite-dll包(32位或64位)
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第4张图片

Step 2.

将下载好的 sqlite-dll 压缩包解压,得到 sqlite3.dll 和 sqlite3.def 两个文件
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第5张图片

Step 3.

将其中的sqlite3.dll拷贝至相应环境的DLLs文件夹,即可正常运行notebook代码
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第6张图片
(图中Anaconda/DLLs文件夹是默认base环境)
如果在其他环境中,则需拷贝至Anaconda/Envs/环境名/DLLs,如图:
The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第7张图片
(如图为try环境中的DLLs文件夹)

3. 可以正常运行代码

The kernel failed to start as a dll could not be loaded: VS Code运行Jupiter Notebook时由于无法启动kernel报错_第8张图片

你可能感兴趣的:(运行代码的小报错,sqlite,vscode,python,jupyter)