在linux里用pip install supervisor,配置文件都在**/usr/local/python3/bin**里,安装时会有黄色字提醒的:
WARNING: The scripts echo_supervisord_conf, pidproxy, supervisorctl and supervisord are installed in '/usr/local/python3/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
所以当我们在自己项目里用vim配置好自己写的supervisor.conf 时,执行
supervisord -c supervisor.conf 时,会报错:无法找到supervisord这个包。
解决办法:
cd /usr/local/python3/bin,里面有echo_supervisord_conf, pidproxy, supervisorctl and supervisord 。
我们只要
cp supervisord /usr/bin/
把supervisord复制到/usr/bin/目录下即可
再次执行,亲测可以成功。