Error trying to import TurtleWorld

669 Views Asked by At

I'm trying to run through the python book ThinkingPython and have gotten to the first case study and I can't get the module to load. I'm using python 3.3.2 and swampy 2.1.5 and and using a mac with the latest OS. When I try to import TurtleWorld I get the error:

Traceback (most recent call last): File "", line 1, in import TurtleWorld ImportError: No module named 'TurtleWorld'

I have no idea why this isn't working. Any help would be appreciated.

2

There are 2 best solutions below

0
On

TurtleWorld is imported as:

import swampy.TurtleWorld
0
On

you could try these:

pip install swampy

If you don't already have pip installed, you could do

sudo pip install swampy

If neither of these work, then you could download the zip file from this website. You would have to unzip the folder and then navigate to install it. This worked for me, the first two didn't but that could just be me.