Sandesh
Sandesh

Reputation: 31

Cannot import WebSocketApp form websocket in python

After installing websocket from pip, I am able to run the python interpreter and from there import WebSocketApp. But when I put same line, from websoket import WebSocketApp, in a file and try to run it, I get the error ImportError: cannot import name WebSocketApp.

What is happening here?

Upvotes: 3

Views: 10435

Answers (2)

Niotx
Niotx

Reputation: 1

try to install or upgrade websocket-client package

pip install --upgrade websocket-client

Upvotes: 0

user6320679
user6320679

Reputation:

Try to update this websocket to a latest version: https://pypi.python.org/pypi/websocket-client/0.37.0

I think the version 0.2.1 has not implemented WebsocketApp.

Upvotes: 5

Related Questions