1 ,安装pip
python3 :wget https://bootstrap.pypa.io/get-pip.py
python2.7:wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py
配置pip源
https://mirrors.huaweicloud.com/home
mkdir ~/.pip/
cat > ~/.pip/pip.conf <<EOF
[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
trusted-host = repo.huaweicloud.com
timeout = 120
EOF
2, pip 安装 jupyterlab
doc: https://jupyter.org/install 设置默认启动参数:https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
Last login: Sat Sep 18 16:52:36 CST 2021 on pts/3
[ocean@c7 ~]$
[ocean@c7 ~]$ jupyter --version
jupyter core : 4.7.1
jupyter-notebook : 6.4.4
qtconsole : not installed
ipython : 7.16.1
ipykernel : 5.5.5
jupyter client : 7.0.2
jupyter lab : 3.1.12
nbconvert : 6.0.7
ipywidgets : not installed
nbformat : 5.1.3
traitlets : 4.3.3
[ocean@c7 ~]$ jupyter server --generate-config
Writing default config to: /home/ocean/.jupyter/jupyter_server_config.py
[ocean@c7 ~]$ grep -Ev '^#' ~/.jupyter/jupyter_server_config.py |grep c
c.ServerApp.ip = '*'
c.ServerApp.open_browser = True
c.ServerApp.port = 8888
[ocean@c7 ~]$ jupyter-lab
[I 2021-09-18 17:03:03.408 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-09-18 17:03:03.717 ServerApp] nbclassic | extension was successfully linked.
[W 2021-09-18 17:03:03.740 ServerApp] WARNING: The Jupyter server is listening on all IP addresses and not using encryption. This is not recommended.
[I 2021-09-18 17:03:03.749 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-09-18 17:03:03.750 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.6/site-packages/jupyterlab
[I 2021-09-18 17:03:03.750 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2021-09-18 17:03:03.755 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-09-18 17:03:03.756 ServerApp] Serving notebooks from local directory: /home/ocean
[I 2021-09-18 17:03:03.756 ServerApp] Jupyter Server 1.11.0 is running at:
[I 2021-09-18 17:03:03.756 ServerApp] http://c7:8888/lab?token=737e21fae63178b115e79a9f9c9d785e18d44670b7b6d4f6
[I 2021-09-18 17:03:03.757 ServerApp] or http://127.0.0.1:8888/lab?token=737e21fae63178b115e79a9f9c9d785e18d44670b7b6d4f6
[I 2021-09-18 17:03:03.757 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2021-09-18 17:03:03.764 ServerApp] No web browser found: could not locate runnable browser.
[C 2021-09-18 17:03:03.764 ServerApp]
To access the server, open this file in a browser:
file:///home/ocean/.local/share/jupyter/runtime/jpserver-8640-open.html
Or copy and paste one of these URLs:
http://c7:8888/lab?token=737e21fae63178b115e79a9f9c9d785e18d44670b7b6d4f6
or http://127.0.0.1:8888/lab?token=737e21fae63178b115e79a9f9c9d785e18d44670b7b6d4f6
|