【问题标题】:How to start ipython notebook on ubuntu server automatically?如何在 ubuntu 服务器上自动启动 ipython notebook?
【发布时间】:2015-11-29 08:20:57
【问题描述】:

我设置了一个 cron 任务来启动 ipython 笔记本服务器

#!/bin/bash
cd /home/.../.ipython/profile_nbserver
exec ipython notebook --profile=nbserver

当我手动运行此脚本时,我成功启动了 ipython 服务器,但是 crontab 无法启动它。我设置了一个日志文件,它是空的。

作为第二次尝试,我设置了一个/etc/init/myipython.conf 文件

description: "ipython"
exec /home/effectivespend/anaconda/bin/ipython notebook --profile=nbserver --notebook-dir=/home/effectivespend/.ipython/profile_nbserver
start on filesystem and net-device-up IFACE!=lo

但这也失败了。

甚至可以让服务器在后台运行 ipython 吗? crontab 不是正确的方法吗?

我基本上想启动它并通过远程计算机访问它。 (即https://address:8888

谢谢

【问题讨论】:

    标签: python ubuntu server ipython


    【解决方案1】:

    我认为使用 cron 时没有设置环境变量。当您运行 bash 脚本时,它可以访问您的 ENV 变量。看这里:

    https://stackoverflow.com/a/26062135/4080476

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-11
      • 1970-01-01
      • 2016-04-28
      • 1970-01-01
      • 1970-01-01
      • 2015-06-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多