我的python版本是3.6。我正在将本教程用于 Statecraft AI (https://pythonprogramming.net/building-neural-network-starcraft-ii-ai-python-sc2-tutorial/)。我从这里导入了 SC2 模块(https://github.com/daniel-kukiela/python-sc2)。
我在跑步时遇到此错误
ModuleNotFoundError:没有名为“websockets”的模块
尝试使用 pip3,它对我有用。
为此需要安装 websockets https://websockets.readthedocs.io/en/stable/intro.html#installation
我花了几个小时尝试安装和卸载
websocket
和 websocket-client
但我需要的真正模块名为 websocket_client
。
pip install websocket_client
sudo python3 -m pip install websocket