安装jupyter
并配置
pip install jupyter
jupyter notebook --generate-config # 生成配置文件
生成配置文件后会显示配置文件生成路径 在该用户的家目录下的.jupyter
文件夹中
vi ~/.jupyter/jupyter_notebook_config.py # 编辑配置文件
将下面的文件修改为对应的值
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False # 默认启动成功会打开浏览器。服务器只有命令行关闭就可以了。
c.NotebookApp.port = 8888 # 开放的端口号
c.NotebookApp.notebook_dir = '/home/zbuter/' # 随便设置一个当前用户有权限的目录就可以
设置访问密码
jupyter notebook password
启动命令
jupyter notebook