美文网首页
(2)jupyter 的安装与使用

(2)jupyter 的安装与使用

作者: 纵春水东流 | 来源:发表于2020-02-14 18:27 被阅读0次

一、shell

#! /bin/bash
pip3 install jupyter jupyterlab

二、细节

1、安装

pip install jupyter
#pip3 install jupyter  #使用python3
#conda install jupyter#使用conda

2、使用

jupyter noterbook

3、配置

#远程登录
jupyter notebook --generate-config # 生成配置文件
#生成密码的哈希密文,这里我使用的密码为123456
python
from notebook.auth import passwd
passwd()
Enter password:
Verify password:
'sha1:da57b4451d64:eee9e79bc5d718688dd5dd5e384d3e432108d313'
#编辑配置文件
vim ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip = '*' # 任意 ip 都可以访问
c.NotebookApp.password = u'ha1:da57b4451d64:eee9e79bc5d718688dd5dd5e384d3e432108d313' # 刚才生成的密码
c.NotebookApp.open_browser = False  #默认不打开浏览器
c.NotebookApp.port = 8888  # 随便指定一个你想要的端口,后面可以从这个端口使用
#启动notebook
jupyter notebook
jupyter notebook --allow-root#若果是root用户,需要添加这一条
#浏览器打开ip:8888即可

相关文章

网友评论

      本文标题:(2)jupyter 的安装与使用

      本文链接:https://www.haomeiwen.com/subject/osjjfhtx.html