我正在开发“ThinkPython”,在chapter4中,我们被要求下载swampy (一个学习模块)。我遵循instructions here并安装了它,但是当我尝试使用import swampy.TurtleWorld在IDLE(Python GUI)中导入时,我得到了以下结果:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import swampy.TurtleWorld
ImportError: No module named 'swampy'我该如何解决这个问题呢?
发布于 2013-01-25 19:00:01
这意味着模块没有正确安装- Python在其模块路径中看不到它。你的$PYTHONPATH是什么,你的操作系统是什么,你有没有检查过模块是否在你的$PYTHONPATH中?
https://stackoverflow.com/questions/14520154
复制相似问题