安装配置 JupyterLab ubuntu20.04

目录

​编辑

(1)安装 

(2)配置

(1)生成配置文件

 (2)生成jupyterlab的登录密码

(3)修改 jupyter 的配置文件

(4)安装 jupyterlab 插件 

(3)启动


 安装时保持software updater设置如下

(1)安装 

sudo apt-get install libffi-dev
sudo apt install python3-pip
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab
sudo apt install jupyter-core
  • 安装jupyterlab时有warning
WARNING: The scripts ... are installed in /home/.../.local/bin which is not on PATH.

参考后解决:(1条消息) WARNING: The scripts ... are installed in /home/.../.local/bin which is not on PATH. 警告之解决_香饽々的博客-CSDN博客

  • 删干净jupyter
pip uninstall -y jupyter
pip uninstall -y jupyter_core
pip uninstall -y jupyter-client
pip uninstall -y jupyter-console
pip uninstall -y notebook
pip uninstall -y qtconsole
pip uninstall -y nbconvert
pip uninstall -y nbformat
  • 为了避免安装时提示版本问题,一定添加清华源在命令行中,我个人的情况是不限定清华源会显示版本不匹配的问题

(2)配置

(1)生成配置文件

jupyter notebook --generate-config

 (2)生成jupyterlab的登录密码

ipython

from notebook.auth import passwd
passwd()
exit()

 ipython与标准python的最大区别在于,Ipython会对命令提示符的每一行进行编号。

详细:ipython和python区别详解_python_脚本之家 (jb51.net)

(3)修改 jupyter 的配置文件

nano ~/.jupyter/jupyter_notebook_config.py

在最后添加以下内容

c.NotebookApp.ip = '0.0.0.0' 
c.NotebookApp.open_browser = False 
c.NotebookApp.password = 'argon2:************"
c.NotebookApp.port = 8888

password就是上一步中的out2,如下,然后保存

(4)安装 jupyterlab 插件 

sudo apt install nodejs npm
pip install nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager

 遇到报错,所以下载nodejs(方法2):Ubuntu安装最新版本NodeJs和Npm的方法_ubuntu安装最新nodejs_小旺仔1024的博客-CSDN博客

(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.

Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages 
An error occurred.
ValueError: Please install nodejs >=12.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website.
See the log file for details:  /tmp/jupyterlab-debug-0w81w6d5.log

然后成功安装

(3)启动

 输入jupyter lab启动

 

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值