I recently upgraded to Python 3.9. However, I wish to run an asyncio websockets client which starts with
import websockets
However, when I attempt to run the code, I get the following:
ModuleNotFoundError: No module named 'websockets'
However, if I attempt to install websockets
using pip3
, I see that it is already installed on my system but in a different location to my python installation:
websockets: ./.local/lib/python3.9/site-packages
Python 3.9: /opt/python/3.9.6/bin/python3
Does anyone know how I can resolve this? I am not using any virtual environment, and I am running Linux.
Thanks in advance