Windows10 打开jupyter notebook出错 & Anaconda 环境激活

我是在安装了Anaconda2之后,又安装了Anaconda3时,运行jupyter notebook时报错,错误如下:

λ jupyter notebook

Traceback (most recent call last):
  File "D:\Python\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 10, in 
    import sqlite3
  File "D:\Python\Anaconda3\lib\sqlite3\__init__.py", line 23, in 
    from sqlite3.dbapi2 import *
  File "D:\Python\Anaconda3\lib\sqlite3\dbapi2.py", line 27, in 
    from _sqlite3 import *
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in 
    from notebook.notebookapp import main
  File "D:\Python\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 86, in 
    from .services.sessions.sessionmanager import SessionManager
  File "D:\Python\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 13, in 
    from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'

尝试了很多方法,网上大部分是基于Linux系统的,需要重编译。最终找到windows下的解决办法。
在sqlte3的官网https://sqlite.org/download.html上下载对应的模块,并copy到D:\Python\Anaconda3\DLLs的目录下,重新运行jupyter。完美解决!!!
Windows10 打开jupyter notebook出错 & Anaconda 环境激活_第1张图片

每次在终端打开Conda环境

conda activate “D:\Python\Anaconda3”

你可能感兴趣的:(软件安装)