AttributeError: 模块 'websocket' 没有属性 'WebSocketApp' pip [英] AttributeError: module 'websocket' has no attribute 'WebSocketApp' pip

查看:73
本文介绍了AttributeError: 模块 'websocket' 没有属性 'WebSocketApp' pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 websocket.WebSocketApp,但是它出现了错误:模块websocket"没有属性WebSocketApp"

I am trying to use websocket.WebSocketApp, however it's coming up with the error: module 'websocket' has no attribute 'WebSocketApp'

我查看了以前的解决方案,并尝试卸载 websocket,安装 websocket-client,但仍然出现相同的错误.

I had a look at previous solutions for this, and tried to uninstall websocket, installed websocket-client and still comes up with the same error.

我的文件名为 MyWebSocket,所以我认为与此无关

My File's name is MyWebSocket, so I don't think it has anything to do with that

有人可以帮我吗?

推荐答案

您安装了错误的 websocket 包.您安装了 websocket 但您需要 websocket-client.卸载两者以清理混乱并重新安装 websocket-client.

You've installed wrong websocket package. You installed websocket but you need websocket-client. Uninstall both to cleanup the mess and reinstall websocket-client.

这篇关于AttributeError: 模块 'websocket' 没有属性 'WebSocketApp' pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆