zoukankan      html  css  js  c++  java
  • 重启宝塔面板后提示-ModuleNotFoundError: No module named 'geventwebsocket'

    背景:
    因服务器部署了flask项目,安装了python3,故重启宝塔面板报错
     1 [Traceback (most recent call last):
     2 File "/root/anaconda3/lib/python3.7/site-packages/gunicorn/util.py", line 135, in load_class
     3    mod = import_module('.'.join(components))
     4 File "/root/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
     5    return _bootstrap._gcd_import(name[level:], package, level)
     6 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
     7 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
     8 File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
     9 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    10 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
    11 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
    12 File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
    13 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    14 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
    15 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
    16 File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    17 ModuleNotFoundError: No module named 'geventwebsocket'
    18 ]
    19 
    20 
    21 ------------------------------------------------------
    22 Error: BT-Panel service startup failed.
    解决办法:
    1、python3安装geventwebsocket
    我不想拆卸python3,也不想删除python3的软链接,所以在网上查到了此方法
    仔细看了下好像是升级python3.7后缺少了geventwebsocket这个模块
    那我尝试了下pip安装这个模块:
    1 sudo pip3 install geventwebsocket
     
    结果还是报错
     
    2、继续安装gevent-websocket
    1 sudo pip3 install gevent-websocket

    安装之后还有报错,提示No module named 'paramiko'

    3、继续安装paramiko

    1 sudo pip3 install paramiko
    4、接着重启宝塔面板
    1 sudo /etc/init.d/bt

    成功!!!

     
  • 相关阅读:
    OpenSSL生成证书、密钥
    js中对String去空格
    正则表达式
    webapi调用
    记一次完整的CI持续集成配置过程(.net core+Jenkins+Gitea)
    处理asp.net core连接mysql的一个异常Sequence contains more than one matching element
    asp.net core 3.1+mysql8.0+Hangfire遇到的异常解决记
    升级到asp.net core 3.1遇到的json异常
    了解ASP.NET Core端点路由
    asp.net core 2.2升到3.1遇到的问题小记
  • 原文地址:https://www.cnblogs.com/longweiqiang/p/11938876.html
Copyright © 2011-2022 走看看