美文网首页
jupyter notebook远程服务器设置

jupyter notebook远程服务器设置

作者: 赵小闹闹 | 来源:发表于2018-08-29 20:50 被阅读13次
    • 1.安装jupyter notebook
      jupyter notebook安装坑: 或者miniconda创建环境后,在环境里用
    conda install jupyter
    

    而不是

    pip install jupyter
    
    • 2.生成配置文件
    jupyter notebook --generate-config
    
      1. 生成密码
        命令行输入ipython
        ipython
    In [1]: from notebook.auth import passwd
    In [2]: passwd()
    Enter password:
    Verify password:
    Out[2]: 'sha1:ce23d945972f:34769685a7ccd3d08c84a18c63968a41f1140274'
    

    把生成的密文‘sha:ce…’复制下来

      1. 修改默认配置文件,
    $vim ~/.jupyter/jupyter_notebook_config.py 
    

    在空白处插入

    c.NotebookApp.ip='*'
    c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
    c.NotebookApp.open_browser = False
    c.NotebookApp.port =8888 #随便指定一个端口
    
    • 5 重新启动jupyter notebook
    • 6 在本地电脑浏览器输入
      localhost:8888
      localhost为服务器IP

    相关文章

      网友评论

          本文标题:jupyter notebook远程服务器设置

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