可以在服务器上安装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
可在服务器上安装jupyter notebook进行开发,摆脱vim环境。介绍了搭建步骤,包括用pip安装、生成配置文件、获取秘钥、填写配置内容,还给出启动命令,启动后可在网页访问。
1987

被折叠的 条评论
为什么被折叠?



