python3安装supervisor

发布 : 2019-04-03 分类 : 运维 浏览 :

python3安装supervisor

需求

我要做一个基于alpine镜像build一个python3的Docker镜像,需要安装supervisor,但是supervisor默认是只支持python2.4以上版本但是不包括python3以上版本的,此文档是介绍python3安装supervisor

报错内容

如果直接用pip3安装supervisor会提示:Supervisor requires Python 2.4 or later but does not work on any version of Python 3. You are using version 3.6.6 (default, Aug 24 2018, 05:04:18)

1
2
3
4
5
6
7
8
9
10
# pip3 install supervisor
Collecting supervisor
Downloading https://files.pythonhosted.org/packages/ba/65/92575a8757ed576beaee59251f64a3287bde82bdc03964b89df9e1d29e1b/supervisor-3.3.5.tar.gz (421kB)
100% |████████████████████████████████| 430kB 230kB/s
Complete output from command python setup.py egg_info:
Supervisor requires Python 2.4 or later but does not work on any version of Python 3. You are using version 3.6.6 (default, Aug 24 2018, 05:04:18)
[GCC 6.4.0]. Please install using a supported version.

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-efd06mz0/supervisor/

解决方法

需要安装git

1
2
3
4
5
6
7
8
9
10
11
# pip3 install git+https://github.com/Supervisor/supervisor#egg=supervisor
Collecting supervisor from git+https://github.com/Supervisor/supervisor#egg=supervisor
Cloning https://github.com/Supervisor/supervisor to /tmp/pip-install-dqs3jvuu/supervisor
Collecting meld3>=1.0.0 (from supervisor)
Downloading https://files.pythonhosted.org/packages/b6/ae/e6d731e4b9661642c1b20591d8054855bb5b8281cbfa18f561c2edd783f7/meld3-1.0.2-py2.py3-none-any.whl
Installing collected packages: meld3, supervisor
Running setup.py install for supervisor ... done
Successfully installed meld3-1.0.2 supervisor-4.0.0.dev0

# which supervisorctl
/usr/bin/supervisorctl

参考文档

关于python3.x上supervisor安装问题?

本文作者 : WGY
原文链接 : http://geeklive.cn/2019/04/03/Python3InstallSupervisor/undefined/Python3InstallSupervisor/
版权声明 : 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!
留下足迹