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