我遇到了这种情况。当我尝试打开 jupyterlab 时,Anaconda 告诉我:
[I 10:01:41.587 LabApp] The port 8888 is already in use, trying another port.
[I 10:01:41.587 LabApp] The port 8889 is already in use, trying another port.
[I 10:01:41.588 LabApp] The port 8890 is already in use, trying another port.
[I 10:01:41.608 LabApp] JupyterLab beta preview extension loaded from D:\Anaconda\install\lib\site-packages\jupyterlab
[I 10:01:41.608 LabApp] JupyterLab application directory is D:\Anaconda\install\share\jupyter\lab
[W 10:01:41.619 LabApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "D:\Anaconda\install\lib\site-packages\jupyterlab\commands.py", line 321, in __init__
self._run(['node', 'node-version-check.js'], cwd=HERE, quiet=True)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\commands.py", line 1165, in _run
proc = Process(cmd, **kwargs)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\process.py", line 73, in __init__
self.proc = self._create_process(cwd=cwd, env=env)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\process.py", line 131, in _create_process
cmd[0] = which(cmd[0], kwargs.get('env'))
File "D:\Anaconda\install\lib\site-packages\jupyterlab\jlpmapp.py", line 59, in which
raise ValueError(msg)
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda\install\lib\site-packages\notebook\notebookapp.py", line 1454, in init_server_extensions
func(self)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\extension.py", line 111, in load_jupyter_server_extension
info = get_app_info(app_dir)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\commands.py", line 244, in get_app_info
handler = _AppHandler(app_dir, logger)
File "D:\Anaconda\install\lib\site-packages\jupyterlab\commands.py", line 324, in __init__
raise ValueError(msg)
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.
[I 10:01:41.709 LabApp] Serving notebooks from local directory: C:\Users\user
[I 10:01:41.709 LabApp] 0 active kernels
[I 10:01:41.710 LabApp] The Jupyter Notebook is running at:
[I 10:01:41.710 LabApp] http://localhost:8891/?token=a3d823839f1107857f79c15ae9d6a109b046b98621186073
[I 10:01:41.710 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:01:41.711 LabApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8891/?token=a3d823839f1107857f79c15ae9d6a109b046b98621186073
[I 10:01:41.761 LabApp] Accepting one-time-token-authenticated connection from ::1
[W 10:01:41.833 LabApp] 404 GET /lab?token=e0fc453fcb7d3a4a22f7042bacf336bea5e90678af55b72f (::1) 72.00ms referer=None
并且chrome显示404:未找到。当我在anaconda中打开jupyter时,我也遇到了这样的情况。
所以我更新了jupyterlab和jupyter,然后都变好了。因此,这种情况可能是版本问题。