jupyter notebook安装_Jupyter notebook 安装

Jupyter Notebook

Jupyter Notebook可以在网页页面中直接编写代码和运行代码,代码的运行结果也会直接在代码块下显示。如在编程过程中需要编写说明文档,可在同一个页面中直接编写,便于作及时的说明和解释。

安装

pip install jupyter或pip3 install jupyter

配置修改

#生成配置文件jupyter notebook --generate-configWriting default config to: /root/.jupyter/jupyter_notebook_config.py#修改配置文件vim /root/.jupyter/jupyter_notebook_config.py

修改内容

## notebook服务会监听的IP地址.c.NotebookApp.ip = '*' ## Hashed password to use for web authentication.#  #  To generate, type in a python/IPython shell:#  #    from notebook.auth import passwd; passwd()#  #  The string should be of the form type:salt:hashed-password.c.NotebookApp.password = u'sha1:fc62874a0050:c956d438fd4980d130cb078708e2c34a41c1a879' ## The port the notebook server will listen on (env: JUPYTER_PORT).c.NotebookApp.port = 8888  ## 用于笔记本和内核的目录。c.NotebookApp.notebook_dir = '/root/樊纲/jupyter_code' ## Whether to open in a browser after starting. The specific browser used is#  platform dependent and determined by the python standard library `webbrowser`#  module, unless it is overridden using the --browser (NotebookApp.browser)#  configuration option.c.NotebookApp.open_browser = False

生成一个sha1的密钥

from notebook.auth import passwdpasswd()# 此时需要输入两次密码(一次设置,一次确认),然后生成sha1的密文,拷贝下来。# Enter password: ········# Verify password: ········# sha1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
07374eb4614d46d9f174b0e2024beb73.png

生成一个sha1的密钥

安装扩展

pip install jupyter_contrib_nbextensions 或pip3 install jupyter_contrib_nbextensionsjupyter contrib nbextension install --user

启动jupyter notebook

#Windowsjupyter notebook#Linuxjupyter notebook --allow-root

打开网页

远程

http://172.168.1.217:8888/

本机

http://127.0.0.1:8888/

29b5198c9cd25a1c41e575395e0a9838.png

输入配置文件sha1对应的明文密码进行登录

16afa49ccb275c79ce69b3a06021163b.png

jupyter界面

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值