jupyterhub的安装和问题解决

 

一、安装

主要参考官网关于安装的文档

https://jupyterhub.readthedocs.io/en/latest/quickstart.html#installation

环境需求:

1.>python3.5

2.nodejs/npm

sudo apt-get install npm nodejs-legacy

安装:

方法一:

pip, npm:

python3 -m pip install jupyterhub
npm install -g configurable-http-proxy
python3 -m pip install notebook  # needed if running the notebook servers locally

 

方法二:

conda install -c conda-forge jupyterhub  # installs jupyterhub and proxy
conda install notebook  # needed if running the notebook servers locally

安装完成后进行测试

jupyterhub -h
configurable-http-proxy -h

二、启动

jupyterhub

 如果要进行多用户登陆则要运行:

sudo  jupyterhub

在浏览器中访问 https://localhost:8000  即可出现登陆页面。

三、小问题

另一个用户在登陆时出现500 error in Jupyterhub的问题,原因是启动jupyter时使用的是~/.jupyter目录下的配置文件,由于配置文件是旧的,导致启动失败。将此目录删掉,重新启动即可。

参考:

https://stackoverflow.com/questions/47605853/500-error-in-jupyterhub?r=SearchResults

I found where the problem is. I had a notebook already in use before the jupyterhub installation and which left some ~/.jupyter configuration files.So when I started the hub and logged in and started my server, it read the old configuration files and caused the unreachable spawner. To solve it, just delete or rename the configuration folder ~/.jupyter. – Arvin. Si.Chuan Dec 9 '17 at 5:52 

四、后续

1.如果你想不用root启动程序可以参考:

https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges

2.如果你想设置开机自动启动,可以参考:

https://www.cnblogs.com/bregman/p/5744109.html

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

路边闲人2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值