Skip to content

cannot import name 'Deque'? #667

@Xonxt

Description

@Xonxt

Been using websockets on my PC for a while, no problems.

Had to briefly test something on another colleague's PC, told him to also install this package, but he's having a weird exception, just when trying to import websockets. Here's the trace:

>>> import websockets
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\%username%\AppData\Roaming\Python\Python36\site-packages\websockets\__init__.py", line 3, in <module>
    from .auth import *
  File "C:\Users\%username%\AppData\Roaming\Python\Python36\site-packages\websockets\auth.py", line 15, in <module>
    from .server import HTTPResponse, WebSocketServerProtocol
  File "C:\Users\%username%\AppData\Roaming\Python\Python36\site-packages\websockets\server.py", line 49, in <module>
    from .protocol import WebSocketCommonProtocol
  File "C:\Users\%username%\AppData\Roaming\Python\Python36\site-packages\websockets\protocol.py", line 18, in <module>
    from typing import (
ImportError: cannot import name 'Deque'

We're both using Python 3.6. I was using websockets 7.0 before, but the colleagues installed the newest 8.0.2. I then also updated to the newest version, yet I still have no problems, while the colleague does.

Any idea what that could be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions