服务器上Jupyter notebook环境搭建
可以在服务器上安装jupyter notebook进行开发工作,这样便可以摆脱服务器的vim环境在jupyter notebook上进行开发
步骤如下:
1、pip install jupyter
2、jupyter notebook –generate-config
3、服务器上打开python交互式,输入
from notebook.auth import passwd
passwd()
按照提示输入两次密码后会产生一个秘钥,需要记住后面使用
4、vim ~/.jupyter/jupyter_notebook_config.py 填写如下内容
5、jupyter notebook启动jupyter,可以按如下命令启动
nohup jupyter notebook --ip=10.84.164.244 >output 2>&1 &
nohup可以将log日志都放在output中且保证在后台运行
–ip则指定好ip这样不容易报错,单独用jupyter notebook启动可能报如下错误:
使用命令nohup jupyter notebook --ip=10.84.164.244 >output 2>&1 &正常启动
正常启动后,在网页打开上面红框中的网址便可访问jupyter