Jupyter安装后必要配置

使用pip进行安装

pip install jupyter

安装运行后无法通过远程访问,需要通过ipython生成秘钥

$ ipython
from notebook.auth import passwd

passwd()

根据提示设置密码,然后记录生成的Sha1秘钥,然后生成Jupyter的配置文件

$ jupyter notebook –generate-config

配置文件在当前用户目录下~/.jupyter/jupyter_notebook_config.py

对配置文件进行修改,加入以下内容:

c.NotebookApp.ip=’服务器地址’
c.NotebookApp.password = u’sha1秘钥’
c.NotebookApp.open_browser = False
c.NotebookApp.port =端口号,默认为8888

重启Jupiter,可以通过远程的机器访问,然后安装扩展插件实现代码的自动补全功能

pip install jupyter_contrib_nbextensions

jupyter contrib nbextension install –user –skip-running-check

再次登录Jupiter notebook,可以看到增加了Nbextensions选项,点击后将里面 “Table of Contents” 以及 “Hinterland”勾选,就可以实现代码的自动补全功能

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用 * 标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>