重啓寶塔面板後提示-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.

 

解決辦法:
一、python3安裝geventwebsocket
我不想拆卸python3,也不想刪除python3的軟連接,因此在網上查到了此方法
仔細看了下好像是升級python3.7後缺乏了geventwebsocket這個模塊
那我嘗試了下pip安裝這個模塊:
1 sudo pip3 install geventwebsocket
 
結果仍是報錯
 
二、繼續安裝gevent-websocket
1 sudo pip3 install gevent-websocket

安裝以後還有報錯,提示No module named 'paramiko'html

 

三、繼續安裝paramikopython

1 sudo pip3 install paramiko

 

四、接着重啓寶塔面板
1 sudo /etc/init.d/bt

 

成功!!!web

 

 

相關文章
相關標籤/搜索