本地訪問服務器jupyter notebook

本地訪問服務器jupyter notebook

1 默認服務器上jupyter notebook安裝完成(建議使用Anaconda,自帶jupyter)
2 配置環境,通過遠程方式訪問jupyter notebook

$ jupyter notebook --generate-config --allow-root

3 生成登錄密碼

$ python 
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:e014e86fa5e2:5f486fca6f143dc92cc7fd8f06d5714205be5523' 
>>> exit()

4 修改配置文件

vim ~/.jupyter/jupyter_notebook_config.py 
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:e014e86fa5e2:5f486fca6f143dc92cc7fd8f06d5714205be5523'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888

5 服務器打開jupyter notebook

jupyter notebook  --ip=0.0.0.0 --no-browser --allow-root

6 本地訪問 http://服務器IP:8888

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章