I’m new to Panda3D, but I’ve had a bit of a look through the initial tutorial in the manual to get me started.
I’m trying to run the following code, but I’m getting an error saying it can’t find libpandaexpress.dll. I’ve checked and it’s in the bin folder, and my panda.pth file shows
..
../bin
so it should work. I was previously getting a DLL load failed error, which I believed was down to using 64-bit Panda3D on 32-bit Python. I installed the 32-bit Panda3D, and now I’m getting this error! I’m now using 32-bit Panda3D on 32-bit Python 2.7 (using Spyder and the IPython console), on a 64-bit Windows 7 PC. Has anyone got any ideas what’s wrong?
Code
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
"""
# Load the environment model.
self.scene = self.loader.loadModel("models/environment")
# Reparent the model to render.
self.scene.reparentTo(self.render)
# Apply scale and position transforms on the model.
self.scene.setScale(0.25, 0.25, 0.25)
self.scene.setPos(-8, 42, 0)
"""
# Load and render the buildings
self.buildings = self.loader.loadModel("models/project/newcastle2.egg")
self.buildings.reparentTo(self.render)
self.buildings.setPos(-424950, -564.525, -80)
app = MyApp()
app.run()
Traceback
Traceback (most recent call last):
File "<ipython-input-37-b458979193cc>", line 1, in <module>
runfile('H:/Research_Scholarship/Panda3D-1.9.4/project.py', wdir='H:/Research_Scholarship/Panda3D-1.9.4')
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile
execfile(filename, namespace)
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "H:/Research_Scholarship/Panda3D-1.9.4/project.py", line 17, in <module>
from direct.showbase.ShowBase import ShowBase
File "direct\showbase\ShowBase.py", line 30, in <module>
from direct.interval import IntervalManager
File "direct\interval\IntervalManager.py", line 5, in <module>
from pandac.PandaModules import *
File "pandac\PandaModules.py", line 2, in <module>
from panda3dCoreModules import *
File "pandac\panda3dCoreModules.py", line 1, in <module>
from extension_native_helpers import *
File "pandac\extension_native_helpers.py", line 66, in <module>
raise ImportError(message)
ImportError: Cannot find libpandaexpress.dll