安装jupyter notebook 远程配置

安装jupyter notebook 远程配置

1. 安装

pip install notebook

配置文件

jupyter notebook --generate-config

配置密码
输入

python
from notebook.auth import passwd
passwd()
Enter 密码
veritify 密码
密码(写入config文件的,记住)
exit()

配置文件:

vi jupyter***config.py
输入:
c=get_config()
****remote_access=True
notebook_ip="*"
**open_browser=False
c.NotebookApp.port =指定一个空闲端口
c.NotebookApp_dir=""指定打开的路径
c.NotebookApp_password=u"" passwd的那一串密码
端口查看命令:
netstat -alp |grep 端口号
lsof -i:port

启动

jupyter notebook --allow-root     
可以用nohup命令和&挂到后端执行
在客户端的浏览器输入http://服务器地址:端口
之后看到login
输入之前设置的密码

设置主题

pip install  jupyterthemes
jt -l 看到输出themes即为安装成功
jt -t  设置主题命令
jt -r 恢复默认设置

插件安装

pip install jupyter_contrib_nbextensions
pip install jupyter_nbextensions_configurator
jupyter contrib nbextensions install --user
jupyter nbextensions_configurator enable --user
之后重启jupyter,在jupyter的home目录下看到

安装jupyter notebook 远程配置
之后点击nbextensions,
安装jupyter notebook 远程配置
如果点击之后下边全是灰色,则是版本不兼容,看下变的兼容版本(4. /5.),之后卸载notebook,再重新安装兼容版本.

安装过程中自己犯的错误

  1. (⊙o⊙)…这个太蠢了,自己设置密码的时候设置的是空,但是总是输入服务器上登录用户的密码。出现这个错误是密码错误。
    安装jupyter notebook 远程配置

  2. 这个是因为端口被占用,换个端口,或者kill掉
    安装jupyter notebook 远程配置

上一篇:pyenv 2.7 环境安装MySQL-python ERROR


下一篇:centos7 安装mysqlclient报错问题