conda 里的 jupyter

1. 安装conda 

https://mirrors.tuna.tsinghua.edu.cn/anaconda/ 下载并安装。

2. 安装jupyter

(1)在ananconda主环境安装:pip install jupyter
(2)运行:jupyter notebook
(3)配置默认根目录: jupyter notebook --generate-config
         打开配置文件设置  {c.NotebookApp.notebook_dir}  的值。
(4)配置内核: 
     在python虚拟环境中运行:
  python -m pip install ipykernel
  python -m ipykernel install --name  [yourkernelname]
(5)回到jupyter安装目录查看可用的内核 : jupyter kernelspec list
 
(others)
删除内核: jupyter kernelspec remove [yourkernelname]
设置jupyter密码:
  • 设置配置文件 jupyter_notebook_config.py 中c.NotebookApp.allow_password_change 设为 False 
  • 命令行生成hash:  jupyter notebook password
    • 注:生成的hash存储在jupyter_notebook_config.json(该文件和jupyter_notebook_config.py在同一个目录下)
  • 继续设置配置文件 jupyter_notebook_config.py 中c.NotebookApp.password 设为 上一步生成的hash。
 
posted @ 2019-04-03 13:30  wxiaoli  阅读(517)  评论(0编辑  收藏  举报