zoukankan      html  css  js  c++  java
  • iPython与notebook的基本用法


     

    1 Ipython 安装

          pip install ipython

    2 Notebooke 基本用法

         启动ipython使用ipython

         启动notebook 使用 ipython notebook

    3 远程使用Ipython notebook 的配置方法

         3.0 创建远程服务

                     语法:  ipython profile create <你要创建的服务器名>

                     e.g.:

                             ipython profile create myserver

                  此时终端会输出 生成的文件位置, 请记住这个位置

         3.1 配置openssl 认证

                       openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

    此时会输出生成的sha 的值, 请记住输出

                   为了方便今后的使用: 此时可以将 mycert.pem 证书移到 ipython notebook的文件夹,将相关的东西放在一起。

           mv mycert.pem .ipython

         3.2  修改配置文件

    c = get_config()
    
    # Kernel config
    c.IPKernelApp.pylab = 'inline'  # if you want plotting support always
    
    # Notebook config
    c.NotebookApp.certfile = u'/home/XXX/.ipython/mycert.pem' ##认证的位置
    c.NotebookApp.ip = '*'
    c.NotebookApp.open_browser = False
    c.NotebookApp.password = u'sha1:XXXX' ## 认证输出的sha值
    # It's a good idea to put it on a known, fixed port
    c.NotebookApp.port = 9999
     
     
     

          3.3 重新启动ubuntu, 并且启动ipython notebook 服务器

           ipython notebook --profile=nbserver

          3.4 远程连接Ipython NoteBook

          打开本地浏览器访问远程noteBook 地址就行,记住端口号是9999

     

     

     

     

     
  • 相关阅读:
    账户管理命令 useradd、groupadd
    项目估算与计划不是一般的难!(1)——从建筑工程说起
    图的存储
    "Storage Virtualization" VS "Software-Defined Storage"
    项目代码风格要求
    struts2入门程序
    poj 3422 (费用流)
    项目估算与计划不是一般的难!(2)——估算要估啥?
    HDU1700:Points on Cycle
    数据结构 邻接矩阵深度及广度优先
  • 原文地址:https://www.cnblogs.com/greentomlee/p/6498403.html
Copyright © 2011-2022 走看看