您的位置:首页 > 编程语言 > Python开发

ipython notebook 远程访问

2016-06-26 11:15 676 查看

创建server配置

<code class="hljs sql has-numbering">ipython profile <span class="hljs-operator"><span class="hljs-keyword">create</span> myserver</span></code><ul style="" class="pre-numbering"><li>1</li></ul>

在profile目录下, 编辑ipython_notebook_config.py

<code class="hljs python has-numbering">~/.ipython/profile_myserver/ipython_notebook_config.py
c = get_config()
c.NotebookApp.certfile=<span class="hljs-string">u'/opt/modules/ML/Python-2.7.8/mycert.pem'</span>
c.NotebookApp.ip=<span class="hljs-string">'*'</span>
c.NotebookApp.open_browser=<span class="hljs-keyword">False</span>
c.NotebookApp.password=<span class="hljs-string">u'sha1:c5f8fbcb1f9a:bfa8a1879fc2f6bd932a1a4089cbc9775cdcd98e'</span>
c.NotebookApp.port=<span class="hljs-number">8888</span></code><ul style="" class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li></ul>

启动

<code class="hljs brainfuck has-numbering"><span class="hljs-comment">ipython</span> <span class="hljs-comment">notebook</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">profile=myserver</span> <span class="hljs-literal">-</span><span class="hljs-literal">-</span><span class="hljs-comment">ip='192</span><span class="hljs-string">.</span><span class="hljs-comment">168</span><span class="hljs-string">.</span><span class="hljs-comment">17</span><span class="hljs-string">.</span><span class="hljs-comment">128'</span></code><ul style="" class="pre-numbering"><li>1</li></ul>

参考

http://ipython.org/ipython-doc/dev/notebook/public_server.html#notebook-public-server

           http://blog.csdn.net/haoran_gao/article/details/50488462
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: