问题描述
导入如下:
from settings import Settings
它进行了追溯。
Traceback (most recent call last):
File "c:\0Data\Desktop\Alien_invasion\Aliens.py",line 5,in <module>
from settings import Settings
ModuleNotFoundError: No module named 'settings'
我检查了。完全一样。这本书是Python速成课程第2版第235页。
解决方法
通过快速的Google搜索,您缺少了所需的文件:
https://github.com/ehmatthes/pcc
从那里拉^取决于您所在的章节。确保将其放在工作目录中。
, The Python Standard Library没有名为settings
的任何模块。很有可能是书中先前创建的模块或随Pip安装的东西