1. 程式人生 > 實用技巧 >jupyter 配置檔案 設定(centos)

jupyter 配置檔案 設定(centos)

首先執行下面一條命令生成jupyternotebook的配置檔案

jupyter notebook --generate-config

進入路徑修改配置

繫結ip

修改

## The IP address the notebook server will listen on.
#  Default: 'localhost'
# c.NotebookApp.ip = 'localhost'

## The IP address the notebook server will listen on.
#  Default: 'localhost'
c.NotebookApp.ip = 'your ip address'

 

設定啟繫結埠
## The port the notebook server will listen on (env: JUPYTER_PORT).
#  Default: 8888
# c.NotebookApp.port = 8888

## The port the notebook server will listen on (env: JUPYTER_PORT).
#  Default: 8888
c.NotebookApp.port = port

關閉開啟瀏覽器

修改

# 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. # Default: True # c.NotebookApp.open_browser = True

# 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. # Default: True c.NotebookApp.open_browser = False