最近要使用队列 需要supervisor来控制队列进程
安装supervisor后 执行
yum install supervisor
supervisor -h
报错了 错误内容
Traceback (most recent call last):
File "/usr/bin/supervisord", line 2, in <module>
from supervisor.supervisord import main
ImportError: No module named supervisor.supervisord
错误原因是因为 cenos6.5默认的python版本是2.6
但是上次安装let's encrypt的时候 把默认的版本改成了2.7 所以会报这个错
因为上次把python2.6的命令改成了,所以修改 /usr/bin/supervisord
vim /usr/bin/supervisord
#讲头部的
#!/usr/bin/python
修改为
#!/usr/bin/python2.6
再次执行
supervisor -h
就可以了
本文介绍了一种解决Supervisor在CentOS 6.5上因Python版本变更导致无法正常运行的问题的方法。通过调整Supervisor的解释器路径,确保其使用正确的Python版本。
2715

被折叠的 条评论
为什么被折叠?



