目录
编辑
(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启动