美文网首页
Xshell配置jupyter notebook

Xshell配置jupyter notebook

作者: ayunga | 来源:发表于2021-12-10 12:22 被阅读0次

jupyter notebook是数据工作者常用的工具,具有优秀的交互式数据分析体验。
本文主要讲怎么在xshell中配置jupyter notebook。

1.下载并安装jupyter notebook

有很多教程,此处省略

2.修改配置文件

$ vi .jupyter/jupyter_notebook_config.py
## 添加如下内容
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'argon2:$argon2id$v=19$m=10240,t=10,p=8$ls7Kg'
c.NotebookApp.port = 9820  ##这个端口和Xshell里的目标端口相同
c.InteractiveShellApp.matplotlib = 'inline'
c.NotebookApp.open_browser = False

3.在xshell中配置

会话属性


添加隧道

倾听端口:10181 --> 网页中用到
目标端口:9820 --> 与jupyter_notebook_config.py文件中设置的 c.NotebookApp.port 端口一致


4.在xshell中运行jupyter

$ jupyter notebook
[W 13:52:39.822 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 13:52:39.842 NotebookApp] Serving notebooks from local directory: /xtdisk/wangmx_group/ayunga
[I 13:52:39.843 NotebookApp] Jupyter Notebook 6.4.5 is running at:
[I 13:52:39.843 NotebookApp] http://loginb2:9820/
[I 13:52:39.843 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

jupyter已打开,转到浏览器

5.在浏览器中打开

格式:localhost:xxxx (xxxx是在xshell中设置的网页端口号),
这里我们是:localhost:10181



输入密码



搞定!

相关文章

网友评论

      本文标题:Xshell配置jupyter notebook

      本文链接:https://www.haomeiwen.com/subject/bgscfrtx.html