Error With Sanic and Websockets

Hello, I am trying to set up a server that uses sanic and no matter what I do I get this error:

Traceback (most recent call last):
File “/home/scanner/DistribScan/server.py”, line 7, in
from sanic import Sanic, response
File “/usr/local/lib/python3.9/dist-packages/sanic/init.py”, line 2, in
from sanic.app import Sanic
File “/usr/local/lib/python3.9/dist-packages/sanic/app.py”, line 77, in
from sanic.server.protocols.websocket_protocol import WebSocketProtocol
File “/usr/local/lib/python3.9/dist-packages/sanic/server/protocols/websocket_protocol.py”, line 3, in
from websockets.connection import CLOSED, CLOSING, OPEN
ModuleNotFoundError: No module named ‘websockets.connection’

I have reinstalled sanic and built it from source and tried different python3 versions and nothing seems to solve it. I could hack it manually but I would rather not do that. Is this a bug?

seems like there is a disconnect in your environment.

What version of Sanic and what version of websockets are installed?