之前安装jupyter notebookPython的软链接由系统的Python2.7改成了Python3.7
结果启动我之前安装好的宝塔面板会报Error: BT-Panel service startup failed.错误。
完整信息如下

[root@wlinn ~]# /etc/init.d/bt
===============宝塔面板命令行==================
(1) 重启面板服务           (8) 改面板端口
(2) 停止面板服务           (9) 清除面板缓存
(3) 启动面板服务           (10) 清除登录限制
(4) 重载面板服务           (11) 取消入口限制
(5) 修改面板密码           (12) 取消域名绑定限制
(6) 修改面板用户名         (13) 取消IP访问限制
(7) 强制修改MySQL密码      (14) 查看面板默认信息
(22) 显示面板错误日志      (15) 清理系统垃圾
(23) 关闭BasicAuth认证     (16) 修复面板(检查错误并更新面板文件到最新版)
(24) 关闭谷歌认证          (17) 设置日志切割是否压缩
(0) 取消
===============================================
请输入命令编号:1
===============================================
正在执行(1)...
===============================================
Stopping Bt-Tasks...    done
Stopping Bt-Panel...    done
Starting Bt-Panel..........failed
------------------------------------------------------

[Traceback (most recent call last):
 File "/root/anaconda3/lib/python3.7/site-packages/gunicorn/util.py", line 135, in load_class
   mod = import_module('.'.join(components))
 File "/root/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'geventwebsocket'
]

------------------------------------------------------
Error: BT-Panel service startup failed.

仔细看了下好像是升级python3.7后缺少了geventwebsocket这个模块
那我尝试了下pip安装这个模块:

    pip install geventwebsocket

结果还是报错,这里报错文档比较长就不放上来了,我仔细看了下找到了一条关键的信息raise Exception("You probably meant to install and run gevent-websocket")大概意思是您可能打算安装并运行gevent websocket
可能是上面那个写法不对,我又试了试如下命令

    pip install gevent-websocket

哎,安装上了(有点小高兴)试着重启一下,但是又说No module named 'paramiko'好吧咋不急继续安装

    pip install paramiko

paramiko安装成功接着尝试重启

    Stopping Bt-Tasks...    done
    Stopping Bt-Panel...    done
    Starting Bt-Panel......    done
    Starting Bt-Tasks...     done

哈哈,欣喜若狂!!浏览器试试

bt

总结下:或许python版本不一样,出现的问题也可能不一样,反正提示缺啥安装啥就是了我的是python
2与python3共存(python2与python3共存可以参考下这篇文章

版权声明:本文为原创文章,版权归 HEML 所有,转载请注明出处!
本文链接:https://www.wlinn.xyz/archives/20.html

Last modification:November 13th, 2019 at 11:45 am
如果觉得我的文章对你有用,请随意赞赏