您好,登錄后才能下訂單哦!
小編給大家分享一下重啟寶塔面板后提示ModuleNotFoundError: No module named 'geventwebsocket'怎么辦,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
背景:
因服務(wù)器部署了flask項目,安裝了python3,故重啟寶塔面板報錯
[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.
解決辦法:
1、python3安裝geventwebsocket
我不想拆卸python3,也不想刪除python3的軟鏈接,所以在網(wǎng)上查到了此方法
仔細看了下好像是升級python3.7后缺少了geventwebsocket這個模塊
那我嘗試了下pip安裝這個模塊:
sudo pip3 install geventwebsocket
結(jié)果還是報錯
2、繼續(xù)安裝gevent-websocket
sudo pip3 install gevent-websocket
安裝之后還有報錯,提示No module named 'paramiko'
3、繼續(xù)安裝paramiko
sudo pip3 install paramiko
4、接著重啟寶塔面板
sudo /etc/init.d/bt
成功?。?!
以上是“重啟寶塔面板后提示ModuleNotFoundError: No module named 'geventwebsocket'怎么辦”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。