ImportError: No module named direct.showbase.ShowBase

So I began my first panda3d tutorial with a speed bump. I’m using the IDLE Python GUI, and when I enter the following code (directly from the tutorial):


from direct.showbase.ShowBase import ShowBase
 
class MyApp(ShowBase):
 
    def __init__(self):
        ShowBase.__init__(self)
 
        # Load the environment model.
        self.environ = self.loader.loadModel("models/environment")
        # Reparent the model to render.
        self.environ.reparentTo(self.render)
        # Apply scale and position transforms on the model.
        self.environ.setScale(0.25, 0.25, 0.25)
        self.environ.setPos(-8, 42, 0)
 
 
app = MyApp()
app.run()

I get this error:
“Traceback (most recent call last):
File “C:\Python31\filename.py”, line 1, in
from direct.showbase.ShowBase import ShowBase
ImportError: No module named direct.showbase.ShowBase”

What do I do?/ What did I do wrong?

You’re using Python 3.1. You have to use the copy of Python that Panda3D ships with.

I just retried it with 2.6.6, and I get the same error =/

I checked and panda3d comes with 2.6.4, so shouldn’t that work?

You either need to use Panda’s copy of Python, by running “ppython”, or you need to copy the panda3d.pth file to your other Python installation.

how do i do that im still getting the same error even after coping the panda3d.pth file