Cannot import libpandaexpress.dll

So i downloaded Panda3D 1.7 and installed it.

I deleted the built in python 2.6.4 and created the panda.pth file.

Note that my installed python version is 2.6.5, but it shouldn’t cause a problem, at least i think.

I’m currently getting this error while trying to run an example

DirectStart: Starting the game.
Traceback (most recent call last):
  File "C:\Panda3D-1.7.0\samples\Carousel\", line 18, in <module>

    import direct.directbase.DirectStart
  File "C:\Panda3D-1.7.0\direct\directbase\", line 3, in <module>
    from direct.showbase import ShowBase
  File "C:\Panda3D-1.7.0\direct\showbase\", line 10, in <module>
    from pandac.PandaModules import *
  File "C:\Panda3D-1.7.0\pandac\", line 2, in <module>
    from libpandaexpressModules import *
  File "C:\Panda3D-1.7.0\pandac\", line 1, in <module>
    from extension_native_helpers import *
  File "C:\Panda3D-1.7.0\pandac\", line 54, in <modul
    raise ImportError, message
ImportError: Cannot find libpandaexpress.dll

Sounds like either your panda.pth is not being read for some reason–maybe it is in the wrong place, or contains a syntactic error–or maybe it’s not pointing to the right path.


My python directory is C:\Python26

The panda.pth file is inside that directory.

The only line inside that file is “C:\Panda3D-1.7.0”
without the quotes of course.

And my Panda path is C:\Panda3D-1.7.0

Problem solved by putting


In the panda.pth file, instead of just C:\Panda3D-1.7.0

Thanks for the tip, it’s working! I was in the exact same situation as yours.

Please someone update the manual at … reparation

Hi evereybody!

I am creating a program using Panda3D 1.6.0 and Python 2.6, It runs nice. But now I need to convert this program to .exe, I used py2exe and pyinstaller 1.5 they create the .exe but both finish with the same warning: ImportError: cannot find lipandaexpress.dll and the .exe does not run.

Can somebody help me?

Hi, you’d better use Panda 1.7.2 - it’s stable and it provides packaging tools which are easier than py2exe.

Oh thanks for your answer…. I got this version yet, but which is the tool I need instead of py2exe, rather where is it set?

Pdeploy produces executables and/or installers; its input is a p3d file that you can obtain using packp3d.

Ok, I have use the packp3d a few minutes ago, “packp3d -o Girando.p3d -d C:/” Girando it´s the name of my .py and C:/ It´s where that is.

But finally cmd shows an error:

keyError: ´Panda3D-1.7.2´
Failure on startup.

What can I do?

If somebody would like to help me…
I will upload for him the archives to be examined. It´s a proyect very simple. Its only an .egg file spining.


I would suggest to isolate the problem in a small complete example that you can post here (so, removing the parts that are not relevant to the problem from your original code). This increases the likelihood that someone can help you.


I wish to make a 3d travel inside of a house, I don´t know how to make the camera to move around the house using the mouse or the keys of the keyboard, I am just trying with a spin. But my more bigger problem it´s to produce an .exe from the .py file.

This is the code of the single .py:

#!/usr/bin/python env
from math import pi, sin, cos

from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from import Actor

class MyApp(ShowBase):
def init(self):

    # Load the environment model.
    self.environ = self.loader.loadModel("base.egg")
    # Reparent the model to render.
    # Apply scale and position transforms on the model.
    self.environ.setScale(0.25, 0.25, 0.25)
    self.environ.setPos(-8, 42, 0)

    # Add the spinCameraTask procedure to the task manager.
    self.taskMgr.add(self.spinCameraTask, "SpinCameraTask")

    # Load and transform the panda actor.
    self.pandaActor = Actor("base.egg")
    self.pandaActor.setScale(1, 1, 1)

# Define a procedure to move the camera.
def spinCameraTask(self, task):
    angleDegrees = task.time * 6.0
    angleRadians = angleDegrees * (pi / 180.0) * sin(angleRadians), -20.0 * cos(angleRadians), 3), 0, 0)
    return Task.cont

app = MyApp()

Here is my proyect to be downloaded:

I do not know a lot of python and I know ya may suggest me to learn more about python and all that stuff at first, but actully at this precice moment I only concern about to get a 3d model of a house to be shown to my classmates.

I wish I can make my own game, and next to this I expect you guys can help with another problems.

I appreciate your help Yaio, thanks.

I can’t say anything about the error you got since I can’t reproduce it (it works on my computer, with a standard 1.7.2 installation on Windows).

First point: you need to change “base.egg” to “base” since when you pack the application those egg files are translated to bam, so you should rely on the Panda capability to determine the “right” extension.

After this modification I made the package:

C:\...>packp3d -o arreglando.p3d -m

and I ran it without problems:

C:\...>panda3d arreglando.p3d

Then, when you get the p3d file you can easily build the exe from it with commands like:

C:\...>pdeploy -v 0.1 arreglando.p3d standalone


C:\...>pdeploy -v 0.1 arreglando.p3d installer

For the record, if you’re building an installer, you’ll probably want a self-contained one:

C:\...>pdeploy -v 0.1 -s arreglando.p3d installer

Note that it can be important to specify the other parameters (see -h for more details).

I just try it out, but that continues like before. I had uninstall it all, and install it again, and It did appear this: Installing Panda3D rev 1. Next it followed working,but at the end it keeps as ever. I will try it as soon as I can using other PC (Windows XP).

Now, I figure that´s a problem of configuration.

This is normal?:

:stuck_out_tongue:ackager: No such file: /c/p3d_info.xml

Maybe is it bacause the build I have it´s for another kind of python?

Which python and which panda3d you recommend me to work together?

And I´ll post the result then.

No, that warning is not related (and I obtain the same warning but the application works).

I don’t think so: the p3d file is built in order to be launched by the runtime - they should be aligned.

Panda 1.7 uses Python 2.6.



I use both of them (Pynthon 2.6, and panda3d 1.7.2), But that didn´t work, even when I used another computer (XP), without a happy result.

Maybe the installers are damaged or anything like that, thougt I downloaded both of them from their original sources!

Try this. Create a file, name it, write this code inside it:

import direct.directbase.DirectStart 

Then open a console, cd to the folder which contains, then run packp3d -o app.p3d, and finally run panda3d app.p3d. Can you see a gray window? If not, what messages do you receive in the console?

I did it!

And it keeps with the same error.

I uploaded a video of what I did here:

Ok, could you try putting the file inside a directory where it is the only file (with no other subdirectories)?