问题描述
我正在用我拥有的一本教科书自学 Python,而且我已经快读完这本书了.但它要我为课程项目安装 pygame 和 livewires.一段时间后,我安装了 pygame 并且它运行良好,但是我无法让 livewires 正常工作,我通过键入pip install LiveWires"来安装它.进入命令提示符,但是当我尝试在 python shell 中导入模块游戏时,出现此错误:
I'm teaching myself python with a text book I have, and i'm nearing the end of of the book. But it wants me to install pygame and livewires for the lesson's project. After awhile i installed pygame and it's working well, but i can't get livewires to work properly, I installed it by typing "pip install LiveWires" into the command prompt, but when i try to import the module games in the python shell, i get this error:
回溯(最近一次调用最后一次):文件 中from livewires import games FileC:\Users\young\AppData\Local\Programs\Python\Python39-32\lib\site-packages\livewires\__init__.py",第32行,在<module>从初学者导入 * ModuleNotFoundError: 没有名为初学者"的模块
有没有其他方法可以安装软件包?这个问题有解决方案吗?任何帮助表示赞赏.
Is there a different way I can install the package? And is there a solution to this problem? any help is appreciated.
推荐答案
您可以将其与相关模块一起安装.也可能您需要更新版本的超级电线而不是 livewires.Livewires 对我来说有错误,但 superwires 就好了.对于 Linux:
You can install it with dependent modules. Also probably you will need updated version superwires instead of livewires. Livewires worked with errors for me, but superwires just fine. For Linux:
sudo apt install python3-pip
sudo apt install python3-pygame
pip3 install livewires
pip3 install superwires
这篇关于如何正确安装带电电线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!