231 字
1 分钟
Jupyter工作站配置

Jupyter工作站配置#

1、安装 jupyter notebook#

Terminal window
conda install jupyter

2、配置Jupyter-config#

2.1、生成jupyter配置文件#

Terminal window
jupyter-notebook --generate-config

该命令执行后会生成./jupyter/jupyter_notebook_config.py的文件

2.2 修改Jupyter_notebook_config.py该配置文件#

c.NotebookApp.ip = '' # 设置访问IP(工作站静态IP)
c.NotebookApp.open_browser = False # 默认不自动打开浏览器
c.NotebookApp.password = '' # 输入刚刚生成的密钥
c.NotebookApp.port = 8888 # 设置端口, 其他端口应该也是可以的
c.NotebookApp.notebook_dir = '' # 设置Jupyternotebook 打开的根目录

上述代码c.NotebookApp.password = ''的设置,需要你在服务器上依次执行如下命令:

Terminal window
python
from notebook.auth import passwd
passwd()

大概如图:

image-20241118203036245

计算机生成了可选文字: (Imgseg)wuguanghui@node/>python python3.7.7(default,May72929,21:25:33〕 [GCC7.3.G] Anaconda,.On Type"help" "copyright 0r到 >>>fromnotebook.authimportpasswd >>>passwd()' rrermatIOn

然后运行完passwd()之后会得到一串密码,放入c.NotebookApp.password = ''里面。

上述代码c.NotebookApp.notebook_dir = ''的设置,这里你需要在引号中加入路径即可。

或者jupyter notebook password

img

Reference:#

【1】https://blog.csdn.net/W_nihao_123456/article/details/108421145

Jupyter工作站配置
https://tuoyuangui.github.io/website/posts/typora/软件安装/jupyter工作站/
作者
椭圆规/tuoyuangui
发布于
2023-04-12
许可协议
CC BY-NC-SA 4.0