重启宝塔面板后提示-ModuleNotFoundError: No module named 'geventwebsocket' _
时间:2024年03月18日
/来源:网络
/编辑:佚名
背景:
因服务器部署了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'
]
------------------------------------------------------
22 Error: BT-Panel service startup failed.
解决办法:
1、python3安装geventwebsocket
我不想拆卸python3,也不想删除python3的软链接,所以在网上查到了此方法
仔细看了下好像是升级python3.7后缺少了geventwebsocket这个模块
那我尝试了下pip安装这个模块:
sudo pip3 install geventwebsocket
结果还是报错
2、继续安装gevent-websocket
sudo pip3 install gevent-websocket
安装之后还有报错,提示No module named 'paramiko'
3、继续安装paramiko
sudo pip3 install paramiko
4、接着重启宝塔面板
sudo /etc/init.d/bt
成功!!!
因服务器部署了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'
]
------------------------------------------------------
22 Error: BT-Panel service startup failed.
解决办法:
1、python3安装geventwebsocket
我不想拆卸python3,也不想删除python3的软链接,所以在网上查到了此方法
仔细看了下好像是升级python3.7后缺少了geventwebsocket这个模块
那我尝试了下pip安装这个模块:
sudo pip3 install geventwebsocket
结果还是报错
2、继续安装gevent-websocket
sudo pip3 install gevent-websocket
安装之后还有报错,提示No module named 'paramiko'
3、继续安装paramiko
sudo pip3 install paramiko
4、接着重启宝塔面板
sudo /etc/init.d/bt
成功!!!
新闻资讯 更多
- 【建站知识】查询nginx日志状态码大于400的请求并打印整行04-03
- 【建站知识】Python中的logger和handler到底是个什么?04-03
- 【建站知识】python3拉勾网爬虫之(您操作太频繁,请稍后访问)04-03
- 【建站知识】xpath 获取meta里的keywords及description的方法04-03
- 【建站知识】python向上取整以50为界04-03
- 【建站知识】scrapy xpath遇见乱码解决04-03
- 【建站知识】scrapy爬取后中文乱码,解决word转为html 时cp1252编码问题04-03
- 【建站知识】scrapy采集—爬取中文乱码,gb2312转为utf-804-03