ubuntu服务器安装 JupyterLab 远程网页打开

文件链接

https://wangxin1248.github.io/linux/2018/11/python3-data-science-01.html


1 安装

pip install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple

或者

pip3 install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple

2 配置 

注意:以下命令是将 JupyterLab 安装在服务器上的,本机电脑安装的话并不需要。

生成登陆密码:

ipython3

In[1]:from notebook.auth import passwd

In[2]:passwd() 

Enterpassword:

Verifypassword:

Out[2]:'yourstring'

生成对应的配置文件:

jupyter lab --generate-config

屏幕输出configfile路劲

vi 打开拷贝

c.NotebookApp.allow_root = True

c.NotebookApp.ip = '0.0.0.0'

c.NotebookApp.open_browser = False

c.NotebookApp.password = u'yourstring'

运行 

which python

which python3


nohup jupyter lab &

sudo ufw allow 8888

运行成功之后在该网络上的随意一台电脑上输入 ip:8888 便可以访问到 jupyterlab 上。

你可能感兴趣的:(ubuntu服务器安装 JupyterLab 远程网页打开)