如常配置python 和 jupyter notebook
但在啓動jupyter notebook 報錯: OSError: [Errno 99]Cannot assign requested address
Solution:
1、生成配置文件(~/.jupyter/jupyter_notebook_config.py)
jupyter notebook --generate-config
2、生成密鑰
jupyter notebook password # 自己造一個密碼輸入一確認一次
vim ~/.jupyter/jupyter_notebook_config.json
記下密鑰,例如:sha1:03c74e2b144e:7…
3、編輯配置文件
vim ~/.jupyter/jupyter_notebook_config.py
修改以下幾項
c.NotebookApp.ip='*' # 就是設置所有ip皆可訪問
c.NotebookApp.password = 'sha1:03c74e2b144e:7…' # 剛纔複製的那個密文'
c.NotebookApp.open_browser = False # 禁止自動打開瀏覽器
c.NotebookApp.port =8888 #隨便指定一個端口
4、啓動jupyter notebook