解决jupyter notebook启动报错:ImportError: DLL load failed while importing _ssl: 找不到指定的模块。

问题:

(base) C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)>jupyter notebook
Traceback (most recent call last):
  File "C:\Software\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in 
    from notebook.notebookapp import main
  File "C:\Software\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 66, in 
    from tornado import httpserver
  File "C:\Software\Anaconda3\lib\site-packages\tornado\httpserver.py", line 29, in 
    import ssl
  File "C:\Software\Anaconda3\lib\ssl.py", line 98, in 
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed while importing _ssl: 找不到指定的程序。

解决方案1(无效情况下请看方案2):

环境变量中加入Anaconda的三个路径(依照自己当初设置的路径):
D:\Users\lenovo\Anaconda3;
D:\Users\lenovo\Anaconda3\Scripts;
D:\Users\lenovo\Anaconda3\Library\bin;

此方法可解决环境变量引发的问题。 

解决方案2

在命令行下 输入:where libssl-1_1-x64.dll

输出如下:

C:\Software\Anaconda3\Library\bin\libssl-1_1-x64.dll
C:\Windows\System32\libssl-1_1-x64.dll

删除C:\Windows\System32\libssl-1_1-x64.dll此文件。 

重新打开jupyter notebook.

你可能感兴趣的:(解决jupyter notebook启动报错:ImportError: DLL load failed while importing _ssl: 找不到指定的模块。)