supervisorctl执行提示setuptools版本问题

今天新上10台Ubuntu 16.04 LTS服务器,利用ansible-playbook批量安装部署supervisor程序。结果安装完成登录服务器查询的时候发现执行supervisorctl都是报错。具体如下:
root@xxxxxx:~# supervisorctl 
/usr/local/lib/python2.7/dist-packages/pkg_resources/py2_warn.py:21: UserWarning: Setuptools will stop working on Python 2
************************************************************
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please follow up at
https://bit.ly/setuptools-py2-warning.
************************************************************
  sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
supervisor> 
查看python和pip版本

root@xxxxxx:~# which python
/usr/bin/python
root@xxxxxx:~# /usr/bin/python -V
Python 2.7.12

root@xxxxxx:~# which pip
/usr/bin/pip
root@xxxxxx:~# pip -V
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
解决方法:
升级pip版本 执行如下命令
pip2 install --upgrade --user pip
使用pip 9.x或更高版本的Setuptools或固定setuptools<45在您的环境中

pip2 install --user "setuptools<45"

 

 
 

 

 

版权声明:
作者:allenjol
链接:https://www.ayunw.cn/archives/783
来源:爱生活,爱运维
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>