1. download nodejs
    href:/nodejs.org/en/download/
  2. unzip and cp to /opt/node-v10.13
  3. modify /etc/profile
gvim /etc/profile
find at **PATH** line
add : PATH = $PATH:/opt/node-v10.13/bin
  1. source /etc/profile
    5.
root@mnant:/opt/node-v10.13/bin# npm -v
6.4.1
root@mnant:/opt/node-v10.13/bin# node -v
v10.13.0
root@mnant:/opt/node-v10.13/bin# 

*Media change: please insert the disc labeled
'Debian GNU/Linux 9.6.0 Stretch - Official amd64 xfce-CD Binary-1 20181110-11:34'
in the drive '/media/cdrom/' and press [Enter]*

Solving method:

  1. vi /etc/apt/sources.list
    Comment on the deb cdrom:[Debian GNU/Linux 9.6.0 _Stretc... line
  2. apt update
  3. OK

1、直接下载安装

2、然后到安装目录里面bin目录:

执行: jupyter notebook --generate-config
修改:.jupyter/jupyter_notebook_config.py
添加:

c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999
c.NotebookApp.notebook_dir = u''

3、jupyter notebook --allow-root &

4、配置自动代码补全 jupyter

ipython profile create
修改:~/.ipython/profile_default/目录下生成ipython_config.py和ipython_kernel_config.py 

添加下面几行:
c.Completer.greedy = True
c.Completer.jedi_compute_type_timeout = 400
c.Completer.use_jedi = True

如果上面的不行:

1.安装nbextensions 

pip install jupyter_contrib_nbextensions -i /pypi.mirrors.ustc.edu.cn/simple
jupyter contrib nbextension install --user
2.安装nbextensions_configurator
pip install --user jupyter_nbextensions_configurator 
jupyter nbextensions_configurator enable --user
如果提示缺少依赖,就使用pip安装对应依赖即可。

重启jupyter,在主页面上,能看到一个Nbextensions标签页,在这个页面里,勾选Hinterland即启用了代码自动补全.