Jupyter

之前学习机器学习的时候,一直用的spyder,后来朋友推荐了jupyter notebook,和jupyterlab,都进行了尝试,在使用中遇到以下问题,流水式说明一下
首先在Anaconda3菜单启动Jupyter Notebook,正常启动,没有问题,进行了简单的代码测试,感觉还不错。
然后尝试JupyterLab,同样在Anaconda3菜单启动 Jupyter Lab,报错信息如下:

[I 11:12:43.060 LabApp] The port 8888 is already in use, trying another port.
[I 11:12:43.099 LabApp] JupyterLab beta preview extension loaded from D:\Anaconda\lib\site-packages\jupyterlab
[I 11:12:43.099 LabApp] JupyterLab application directory is D:\Anaconda\share\jupyter\lab
[W 11:12:43.110 LabApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "D:\Anaconda\lib\site-packages\jupyterlab\commands.py", line 321, in __init__
self._run(['node', 'node-version-check.js'], cwd=HERE, quiet=True)
File "D:\Anaconda\lib\site-packages\jupyterlab\commands.py", line 1165, in _run
proc = Process(cmd, **kwargs)
File "D:\Anaconda\lib\site-packages\jupyterlab\process.py", line 73, in __init__
self.proc = self._create_process(cwd=cwd, env=env)
File "D:\Anaconda\lib\site-packages\jupyterlab\process.py", line 131, in _create_process
cmd[0] = which(cmd[0], kwargs.get('env'))
File "D:\Anaconda\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\lib\site-packages\notebook\notebookapp.py", line 1454, in init_server_extensions
func(self)
File "D:\Anaconda\lib\site-packages\jupyterlab\extension.py", line 111, in load_jupyter_server_extension
info = get_app_info(app_dir)
File "D:\Anaconda\lib\site-packages\jupyterlab\commands.py", line 244, in get_app_info
handler = _AppHandler(app_dir, logger)
File "D:\Anaconda\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 11:12:43.271 LabApp] Serving notebooks from local directory: C:\Users\op1691
[I 11:12:43.271 LabApp] 0 active kernels
[I 11:12:43.271 LabApp] The Jupyter Notebook is running at:
[I 11:12:43.271 LabApp] http://localhost:8889/?token=9f6687c0dd7bc5fdf09f6cffcaca0664b9d010a4c3b6786f
[I 11:12:43.271 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:12:43.279 LabApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8889/?token=9f6687c0dd7bc5fdf09f6cffcaca0664b9d010a4c3b6786f
[I 11:12:43.689 LabApp] Accepting one-time-token-authenticated connection from ::1
[W 11:12:43.759 LabApp] 404 GET /lab?token=6fd145467cf6f6506ee0b60151f0a16e7ea888ec8c2a03b0 (::1) 70.31ms referer=None

首先是发现端口8888被占用,需要关闭占用端口的应用,参照:https://jingyan.baidu.com/article/3c48dd34491d47e10be358b8.html
然后依然错误:ValueError: Please install nodejs 5+ and npm before continuing installation,
错误是因为此版本Anaconda3中的jupyterlab版本0.31.4存在bug,所以只要升级jupyterlab就可以解决问题,选择update application
在这里插入图片描述
补充一点:修改home目录
找到以下文件
在这里插入图片描述
然后打开文件后,修改以下内容
在这里插入图片描述
保存后重启jupyter lab即可
有关jupyter Notebook详细说明可以参考:http://m.elecfans.com/article/687743.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值