问题描述
- Windows10 下使用
Traceback (most recent call last):
File "C:\Users\xxx\Anaconda3\lib\site-packages\jupyterlab_server\server.py", line 14, in <module>
from notebook.base.handlers import (
File "C:\Users\xxx\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 22, in <module>
from tornado import web, gen, escape, httputil
File "C:\Users\xxx\Anaconda3\lib\site-packages\tornado\web.py", line 87, in <module>
from tornado.httpserver import HTTPServer
File "C:\Users\xxx\Anaconda3\lib\site-packages\tornado\httpserver.py", line 29, in <module>
import ssl
File "C:\Users\xxx\Anaconda3\lib\ssl.py", line 98, in <module>
import _ssl
ImportError: DLL load failed while importing _ssl: 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\xxx\Anaconda3\Scripts\jupyter-lab-script.py", line 5, in <module>
from jupyterlab.labapp import main
File "C:\Users\xxx\Anaconda3\lib\site-packages\jupyterlab\labapp.py", line 14, in <module>
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "C:\Users\xxx\Anaconda3\lib\site-packages\jupyterlab_server\__init__.py", line 4, in <module>
from .app import LabServerApp
File "C:\Users\xxx\Anaconda3\lib\site-packages\jupyterlab_server\app.py", line 9, in <module>
from .server import ServerApp
File "C:\Users\xxx\Anaconda3\lib\site-packages\jupyterlab_server\server.py", line 26, in <module>
from jupyter_server.base.handlers import (
ModuleNotFoundError: No module named 'jupyter_server'
原因分析
- Anaconda 路径 C:\Users\username\Anaconda3\Library\bin 没有添加到 Windows 系统环境变量中
解决方法
C:\Users\username\Anaconda3
C:\Users\username\Anaconda3\Scripts
C:\Users\username\Anaconda3\Library\bin