安装部署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版本
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"
发表评论