Hmm, I don't think asyncio is an attribute of websockets so maybe that's the reason? Have you tried using like an IDE just to verify websockets will import? I would think that would probably be a way to verify if there's an issue with the code versus if you're actually having an issue with package since it's clearly showing it's a package you have through PIP