supervisor
supervisor 只支持在Python下运行
centos7安装:
yum install epel-release
yum install -y supervisor
在python3下启动supervisor
python2 supervisorctl start xxx_uwsgi
python2 python3软连接
python3切换到Python2:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 200
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 100
python2 切换到python3(使用软连接):
先判断当前python 或者python3指向的是什么地址,如果指向地址不是你定义的,就进行先删除软连接,后建立新的软连接
记最好使用虚拟环境(pyenv等),在虚拟环境外进行软连接指向python2,常规操作可在虚拟环境中进行,也可使用环境变量的优先度,达到启动supervisor的情况,