python - livewires MacOS中“初学者”的模块错误 - 初学者
问题描述
我是 python 的初学者,正在学习一本名为“绝对初学者的 Python 编程”的书,并且在导入 livewires 时遇到了问题。
当我写from livewires import games
它时弹出错误:
line 1, in <module>
from livewires import games
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/livewires/__init__.py", line 32, in <module>
from beginners import *
ModuleNotFoundError: No module named 'beginners'
我不知道如何处理这个问题,因为我已经对此进行了研究,但我还没有找到解决方案。
我安装 livewires 的方式(我已经安装了 pygame)
pip install livewires
和
pip install superwires
解决方案
LiveWires似乎只支持 Python 2。您可以使用SuperWires而不是 LiveWires:
pip3 install superwires
from superwires import games # Just replace `livewires` with `superwires`
参考
推荐阅读
- hashicorp-vault - Hashicorp Vault - 进行 api 调用时出现 403
- c# - 类之间的转换是否有模式
- java - 在 JPA 中获取单列值
- javascript - 很难使用节点超级代理获取 API
- asp.net-core - ASP.NET Core 修改异常头
- spring-boot - 项目处理器中的 Spring Batch 运行时异常
- r - 根据他们在 geom_bar 中的排名重新排序(闪避)
- javascript - 将自定义 javascript 添加到 wix
- html - 如何定位两个具有重叠角的 div,例如链中的链接?
- javascript - 在 onClick 处理程序中设置 useState 的问题