使用jupyter建立服务器的好处在于可以拥有图形界面,可以在服务器上直接编写代码调试。
一.使用jupyter实现局域网远程连接
不同电脑通过服务器的ip地址和端口号实现远程连接。例如:http//172.20.10.4:8888/实现远程连接,其中,172.20.10.4是服务器ip地址,8888是设置的服务器端口。
具体实现流程如下:
1.安装jupyter
pip3 install jupyter
2.生成.jupyter/jupyter_notebook_config.py配置文件
jupyter notebook --generate-config
具体位置在/home/.jupyter/jupyter_notebook_config.py
3.生成秘钥,打开一个终端,依次执行
python3
from notebook.auth import passwd
passwd()
在最后会要求设置一个密码,用于客户