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

猜你喜欢

转载自blog.csdn.net/v6543210/article/details/85047398
今日推荐