当前位置:   article > 正文

安装配置 JupyterLab ubuntu20.04_ubuntu安装jupyter lab

ubuntu安装jupyter lab

目录

​编辑

(1)安装 

(2)配置

(1)生成配置文件

 (2)生成jupyterlab的登录密码

(3)修改 jupyter 的配置文件

(4)安装 jupyterlab 插件 

(3)启动


 安装时保持software updater设置如下

(1)安装 

  1. sudo apt-get install libffi-dev
  2. sudo apt install python3-pip
  3. pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter
  4. pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab
  5. 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
  1. pip uninstall -y jupyter
  2. pip uninstall -y jupyter_core
  3. pip uninstall -y jupyter-client
  4. pip uninstall -y jupyter-console
  5. pip uninstall -y notebook
  6. pip uninstall -y qtconsole
  7. pip uninstall -y nbconvert
  8. pip uninstall -y nbformat
  • 为了避免安装时提示版本问题,一定添加清华源在命令行中,我个人的情况是不限定清华源会显示版本不匹配的问题

(2)配置

(1)生成配置文件

jupyter notebook --generate-config

 (2)生成jupyterlab的登录密码

  1. ipython
  2. from notebook.auth import passwd
  3. passwd()
  4. exit()

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

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

(3)修改 jupyter 的配置文件

nano ~/.jupyter/jupyter_notebook_config.py

在最后添加以下内容

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

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

(4)安装 jupyterlab 插件 

  1. sudo apt install nodejs npm
  2. pip install nodejs
  3. jupyter labextension install @jupyter-widgets/jupyterlab-manager

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

  1. (Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.
  2. Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages
  3. An error occurred.
  4. ValueError: Please install nodejs >=12.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website.
  5. See the log file for details: /tmp/jupyterlab-debug-0w81w6d5.log

然后成功安装

(3)启动

 输入jupyter lab启动

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/244990?site
推荐阅读
相关标签
  

闽ICP备14008679号